Sophie

Sophie

distrib > Fedora > 13 > x86_64 > by-pkgid > f5b8bf9ba5c3c0062e8b494b5ddab2e8 > files > 67

cairomm-devel-1.8.4-1.fc13.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
        <title>cairomm: Cairo::PdfSurface Class Reference</title>
        <link href="cairomm.css" rel="stylesheet" type="text/css">
    </head>
<body>
<!-- Generated by Doxygen 1.5.9 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespaceCairo.html">Cairo</a>::<a class="el" href="classCairo_1_1PdfSurface.html">PdfSurface</a>
  </div>
</div>
<div class="contents">
<h1>Cairo::PdfSurface Class Reference</h1><!-- doxytag: class="Cairo::PdfSurface" --><!-- doxytag: inherits="Cairo::Surface" -->A <a class="el" href="classCairo_1_1PdfSurface.html" title="A PdfSurface provides a way to render PDF documents from cairo.">PdfSurface</a> provides a way to render PDF documents from cairo.  
<a href="#_details">More...</a>
<p>
Inherits <a class="el" href="classCairo_1_1Surface.html">Cairo::Surface</a>.
<p>

<p>
<a href="classCairo_1_1PdfSurface-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCairo_1_1PdfSurface.html#b2da398a2c5b4d0489964eff3adad638">PdfSurface</a> (cairo_surface_t*<a class="el" href="classCairo_1_1Surface.html#d176eb7343b5902df3c19f9f56e59fb4">cobject</a>, bool has_reference=false)</td></tr>

<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a C++ wrapper for the C instance.  <a href="#b2da398a2c5b4d0489964eff3adad638"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCairo_1_1PdfSurface.html#e2a9198838ff56d5f46cd28becffdd48">~PdfSurface</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCairo_1_1PdfSurface.html#aae35e5e41a731d3f16f3b238b364bdc">set_size</a> (double width_in_points, double height_in_points)</td></tr>

<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Changes the size of a PDF surface for the current (and subsequent) pages.  <a href="#aae35e5e41a731d3f16f3b238b364bdc"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classCairo_1_1RefPtr.html">RefPtr</a>&lt; <a class="el" href="classCairo_1_1PdfSurface.html">PdfSurface</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCairo_1_1PdfSurface.html#92403fe5ad8ae6862e005c3d185e9123">create</a> (<a class="elRef" doxygen="libstdc++.tag:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00218.html">std::string</a> filename, double width_in_points, double height_in_points)</td></tr>

<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a <a class="el" href="classCairo_1_1PdfSurface.html" title="A PdfSurface provides a way to render PDF documents from cairo.">PdfSurface</a> with a specified dimensions that will be saved as the given filename.  <a href="#92403fe5ad8ae6862e005c3d185e9123"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classCairo_1_1RefPtr.html">RefPtr</a>&lt; <a class="el" href="classCairo_1_1PdfSurface.html">PdfSurface</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCairo_1_1PdfSurface.html#a8537c400b7b212550dd4091099a8b2a">create_for_stream</a> (const <a class="el" href="classCairo_1_1Surface.html#02fb9416d466b762bc5845b0ae204f49">SlotWriteFunc</a>&amp; write_func, double width_in_points, double height_in_points)</td></tr>

<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a <a class="el" href="classCairo_1_1PdfSurface.html" title="A PdfSurface provides a way to render PDF documents from cairo.">PdfSurface</a> with a specified dimensions that will be written to the given write function instead of saved directly to disk.  <a href="#a8537c400b7b212550dd4091099a8b2a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classCairo_1_1RefPtr.html">RefPtr</a>&lt; <a class="el" href="classCairo_1_1PdfSurface.html">PdfSurface</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCairo_1_1PdfSurface.html#a9fc3e58c824a3fe4428b556f6938382">create</a> (cairo_write_func_t write_func, void* closure, double width_in_points, double height_in_points)</td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A <a class="el" href="classCairo_1_1PdfSurface.html" title="A PdfSurface provides a way to render PDF documents from cairo.">PdfSurface</a> provides a way to render PDF documents from cairo. 
<p>
This surface is not rendered to the screen but instead renders the drawing to a PDF file on disk.<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>For this <a class="el" href="classCairo_1_1Surface.html" title="A cairo surface represents an image, either as the destination of a drawing operation...">Surface</a> to be available, cairo must have been compiled with PDF support </dd></dl>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="b2da398a2c5b4d0489964eff3adad638"></a><!-- doxytag: member="Cairo::PdfSurface::PdfSurface" ref="b2da398a2c5b4d0489964eff3adad638" args="(cairo_surface_t *cobject, bool has_reference=false)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Cairo::PdfSurface::PdfSurface           </td>
          <td>(</td>
          <td class="paramtype">cairo_surface_t *&#160;</td>
          <td class="paramname"> <em>cobject</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"> <em>has_reference</em> = <code>false</code></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [explicit]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create a C++ wrapper for the C instance. 
<p>
This C++ instance should then be given to a <a class="el" href="classCairo_1_1RefPtr.html" title="RefPtr&lt;&gt; is a reference-counting shared smartpointer.">RefPtr</a>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>cobject</em>&#160;</td><td>The C instance. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>has_reference</em>&#160;</td><td>whether we already have a reference. Otherwise, the constructor will take an extra reference. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="e2a9198838ff56d5f46cd28becffdd48"></a><!-- doxytag: member="Cairo::PdfSurface::~PdfSurface" ref="e2a9198838ff56d5f46cd28becffdd48" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual Cairo::PdfSurface::~PdfSurface           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&#160;)&#160;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a9fc3e58c824a3fe4428b556f6938382"></a><!-- doxytag: member="Cairo::PdfSurface::create" ref="a9fc3e58c824a3fe4428b556f6938382" args="(cairo_write_func_t write_func, void *closure, double width_in_points, double height_in_points)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classCairo_1_1RefPtr.html">RefPtr</a>&lt;<a class="el" href="classCairo_1_1PdfSurface.html">PdfSurface</a>&gt; Cairo::PdfSurface::create           </td>
          <td>(</td>
          <td class="paramtype">cairo_write_func_t&#160;</td>
          <td class="paramname"> <em>write_func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"> <em>closure</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"> <em>width_in_points</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"> <em>height_in_points</em></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<dl class="deprecated" compact><dt><b><a class="el" href="deprecated.html#_deprecated000007">Deprecated:</a></b></dt><dd>use <a class="el" href="classCairo_1_1PdfSurface.html#a8537c400b7b212550dd4091099a8b2a" title="Creates a PdfSurface with a specified dimensions that will be written to the given...">PdfSurface::create_for_stream()</a> instead </dd></dl>

</div>
</div><p>
<a class="anchor" name="92403fe5ad8ae6862e005c3d185e9123"></a><!-- doxytag: member="Cairo::PdfSurface::create" ref="92403fe5ad8ae6862e005c3d185e9123" args="(std::string filename, double width_in_points, double height_in_points)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classCairo_1_1RefPtr.html">RefPtr</a>&lt;<a class="el" href="classCairo_1_1PdfSurface.html">PdfSurface</a>&gt; Cairo::PdfSurface::create           </td>
          <td>(</td>
          <td class="paramtype"><a class="elRef" doxygen="libstdc++.tag:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00218.html">std::string</a>&#160;</td>
          <td class="paramname"> <em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"> <em>width_in_points</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"> <em>height_in_points</em></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Creates a <a class="el" href="classCairo_1_1PdfSurface.html" title="A PdfSurface provides a way to render PDF documents from cairo.">PdfSurface</a> with a specified dimensions that will be saved as the given filename. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>filename</em>&#160;</td><td>The name of the PDF file to save the surface to </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>width_in_points</em>&#160;</td><td>The width of the PDF document in points </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>height_in_points</em>&#160;</td><td>The height of the PDF document in points </td></tr>
  </table>
</dl>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pdf-surface_8cc-example.html#a2">pdf-surface.cc</a>.</dl>
</div>
</div><p>
<a class="anchor" name="a8537c400b7b212550dd4091099a8b2a"></a><!-- doxytag: member="Cairo::PdfSurface::create_for_stream" ref="a8537c400b7b212550dd4091099a8b2a" args="(const SlotWriteFunc &amp;write_func, double width_in_points, double height_in_points)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classCairo_1_1RefPtr.html">RefPtr</a>&lt;<a class="el" href="classCairo_1_1PdfSurface.html">PdfSurface</a>&gt; Cairo::PdfSurface::create_for_stream           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classCairo_1_1Surface.html#02fb9416d466b762bc5845b0ae204f49">SlotWriteFunc</a>&amp;&#160;</td>
          <td class="paramname"> <em>write_func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"> <em>width_in_points</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"> <em>height_in_points</em></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Creates a <a class="el" href="classCairo_1_1PdfSurface.html" title="A PdfSurface provides a way to render PDF documents from cairo.">PdfSurface</a> with a specified dimensions that will be written to the given write function instead of saved directly to disk. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>write_func</em>&#160;</td><td>The function to be called when the backend needs to write data to an output stream </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>width_in_points</em>&#160;</td><td>The width of the PDF document in points </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>height_in_points</em>&#160;</td><td>The height of the PDF document in points</td></tr>
  </table>
</dl>
<dl class="since" compact><dt><b>Since:</b></dt><dd>1.8 </dd></dl>

</div>
</div><p>
<a class="anchor" name="aae35e5e41a731d3f16f3b238b364bdc"></a><!-- doxytag: member="Cairo::PdfSurface::set_size" ref="aae35e5e41a731d3f16f3b238b364bdc" args="(double width_in_points, double height_in_points)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Cairo::PdfSurface::set_size           </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"> <em>width_in_points</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"> <em>height_in_points</em></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Changes the size of a PDF surface for the current (and subsequent) pages. 
<p>
This function should only be called before any drawing operations have been performed on the current page. The simplest way to do this is to call this function immediately after creating the surface or immediately after completing a page with either <a class="el" href="classCairo_1_1Context.html#525cac95b4d4c2abea12b82c433adba9">Context::show_page()</a> or <a class="el" href="classCairo_1_1Context.html#7ccbeacb2a7f2d787b3daf31a69383fd">Context::copy_page()</a>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>width_in_points</em>&#160;</td><td>new surface width, in points (1 point == 1/72.0 inch) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>height_in_points</em>&#160;</td><td>new surface height, in points (1 point == 1/72.0 inch) </td></tr>
  </table>
</dl>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li>cairomm/surface.h</ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Aug 13 11:40:14 2009 for cairomm by&#160;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
</body>
</html>