Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > bf5ad49bf8714f68fa4d0bb1597cb497 > files > 61

cairomm-doc-1.9.8-2.fc15.2.noarch.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::SvgSurface Class Reference</title>
        <link href="cairomm.css" rel="stylesheet" type="text/css">
    </head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul class="tablist">
      <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="tabs2">
    <ul class="tablist">
      <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">
    <ul>
      <li><a class="el" href="namespaceCairo.html">Cairo</a>      </li>
      <li><a class="el" href="classCairo_1_1SvgSurface.html">Cairo::SvgSurface</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a>  </div>
  <div class="headertitle">
<h1>Cairo::SvgSurface Class Reference</h1>  </div>
</div>
<div class="contents">
<!-- doxytag: class="Cairo::SvgSurface" --><!-- doxytag: inherits="Cairo::Surface" -->
<p>A <a class="el" href="classCairo_1_1SvgSurface.html" title="A SvgSurface provides a way to render Scalable Vector Graphics (SVG) images from cairo.">SvgSurface</a> provides a way to render Scalable Vector Graphics (SVG) images from cairo.  
<a href="#_details">More...</a></p>

<p>Inherits <a class="el" href="classCairo_1_1Surface.html">Cairo::Surface</a>.</p>

<p><a href="classCairo_1_1SvgSurface-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCairo_1_1SvgSurface.html#a67303207546ee57abfa62d4d0892575f">SvgSurface</a> (cairo_surface_t*<a class="el" href="classCairo_1_1Surface.html#ad176eb7343b5902df3c19f9f56e59fb4">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="#a67303207546ee57abfa62d4d0892575f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCairo_1_1SvgSurface.html#af782712407e736ea1d5c4e4c272ff7f1">~SvgSurface</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCairo_1_1SvgSurface.html#a4ac854641fe28b16c5e01582d91e22dc">restrict_to_version</a> (<a class="el" href="namespaceCairo.html#a853a6353847b8cd86001a98d36b245ca">SvgVersion</a> version)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Restricts the generated SVG file to the given version.  <a href="#a4ac854641fe28b16c5e01582d91e22dc"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classCairo_1_1RefPtr.html">RefPtr</a>&lt; <a class="el" href="classCairo_1_1SvgSurface.html">SvgSurface</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCairo_1_1SvgSurface.html#a54d98ee27aa6274627335d8ccbd34a6e">create</a> (<a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00237.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_1SvgSurface.html" title="A SvgSurface provides a way to render Scalable Vector Graphics (SVG) images from cairo.">SvgSurface</a> with a specified dimensions that will be saved as the given filename.  <a href="#a54d98ee27aa6274627335d8ccbd34a6e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classCairo_1_1RefPtr.html">RefPtr</a>&lt; <a class="el" href="classCairo_1_1SvgSurface.html">SvgSurface</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCairo_1_1SvgSurface.html#a3cc1ca3b8191ab2366b20fea664c2ce9">create_for_stream</a> (const <a class="el" href="classCairo_1_1Surface.html#a02fb9416d466b762bc5845b0ae204f49">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_1SvgSurface.html" title="A SvgSurface provides a way to render Scalable Vector Graphics (SVG) images from cairo.">SvgSurface</a> with a specified dimensions that will be written to the given write function instead of saved directly to disk.  <a href="#a3cc1ca3b8191ab2366b20fea664c2ce9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classCairo_1_1RefPtr.html">RefPtr</a>&lt; <a class="el" href="classCairo_1_1SvgSurface.html">SvgSurface</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCairo_1_1SvgSurface.html#a88fc030bd0b9ffa7f3455fcdf383ea16">create</a> (cairo_write_func_t write_func, void* closure, double width_in_points, double height_in_points)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00640.html">std::vector</a><br class="typebreak"/>
&lt; <a class="el" href="namespaceCairo.html#a853a6353847b8cd86001a98d36b245ca">SvgVersion</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCairo_1_1SvgSurface.html#a25403772072f28f7c40e6478332babaa">get_versions</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the list of SVG versions supported by cairo.  <a href="#a25403772072f28f7c40e6478332babaa"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00237.html">std::string</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCairo_1_1SvgSurface.html#a3a15a5df131a8ef6cc8786342c7e6dfc">version_to_string</a> (<a class="el" href="namespaceCairo.html#a853a6353847b8cd86001a98d36b245ca">SvgVersion</a> version)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the string representation of the given version id.  <a href="#a3a15a5df131a8ef6cc8786342c7e6dfc"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>A <a class="el" href="classCairo_1_1SvgSurface.html" title="A SvgSurface provides a way to render Scalable Vector Graphics (SVG) images from cairo.">SvgSurface</a> provides a way to render Scalable Vector Graphics (SVG) images from cairo. </p>
<p>This surface is not rendered to the screen but instead renders the drawing to an SVG file on disk.</p>
<dl class="note"><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 or as source wh...">Surface</a> to be available, cairo must have been compiled with SVG support </dd></dl>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a67303207546ee57abfa62d4d0892575f"></a><!-- doxytag: member="Cairo::SvgSurface::SvgSurface" ref="a67303207546ee57abfa62d4d0892575f" args="(cairo_surface_t *cobject, bool has_reference=false)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Cairo::SvgSurface::SvgSurface </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>
<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><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>
  </dd>
</dl>

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

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a54d98ee27aa6274627335d8ccbd34a6e"></a><!-- doxytag: member="Cairo::SvgSurface::create" ref="a54d98ee27aa6274627335d8ccbd34a6e" 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_1SvgSurface.html">SvgSurface</a>&gt; Cairo::SvgSurface::create </td>
          <td>(</td>
          <td class="paramtype"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00237.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_1SvgSurface.html" title="A SvgSurface provides a way to render Scalable Vector Graphics (SVG) images from cairo.">SvgSurface</a> with a specified dimensions that will be saved as the given filename. </p>
<dl><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 SVG 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 SVG 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 SVG document in points </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="svg-surface_8cc-example.html#a2">svg-surface.cc</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="a88fc030bd0b9ffa7f3455fcdf383ea16"></a><!-- doxytag: member="Cairo::SvgSurface::create" ref="a88fc030bd0b9ffa7f3455fcdf383ea16" 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_1SvgSurface.html">SvgSurface</a>&gt; Cairo::SvgSurface::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">
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000015">Deprecated:</a></b></dt><dd>Use <a class="el" href="classCairo_1_1SvgSurface.html#a3cc1ca3b8191ab2366b20fea664c2ce9" title="Creates a SvgSurface with a specified dimensions that will be written to the given write function ins...">SvgSurface::create_for_stream()</a> instead </dd></dl>

</div>
</div>
<a class="anchor" id="a3cc1ca3b8191ab2366b20fea664c2ce9"></a><!-- doxytag: member="Cairo::SvgSurface::create_for_stream" ref="a3cc1ca3b8191ab2366b20fea664c2ce9" 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_1SvgSurface.html">SvgSurface</a>&gt; Cairo::SvgSurface::create_for_stream </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classCairo_1_1Surface.html#a02fb9416d466b762bc5845b0ae204f49">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_1SvgSurface.html" title="A SvgSurface provides a way to render Scalable Vector Graphics (SVG) images from cairo.">SvgSurface</a> with a specified dimensions that will be written to the given write function instead of saved directly to disk. </p>
<dl><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 SVG 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 SVG document in points</td></tr>
  </table>
  </dd>
</dl>
<dl class="since"><dt><b>Since:</b></dt><dd>1.8 </dd></dl>

</div>
</div>
<a class="anchor" id="a25403772072f28f7c40e6478332babaa"></a><!-- doxytag: member="Cairo::SvgSurface::get_versions" ref="a25403772072f28f7c40e6478332babaa" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00640.html">std::vector</a>&lt;<a class="el" href="namespaceCairo.html#a853a6353847b8cd86001a98d36b245ca">SvgVersion</a>&gt; Cairo::SvgSurface::get_versions </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Retrieves the list of SVG versions supported by cairo. </p>
<p>See <a class="el" href="classCairo_1_1SvgSurface.html#a4ac854641fe28b16c5e01582d91e22dc" title="Restricts the generated SVG file to the given version.">restrict_to_version()</a>.</p>
<dl class="since"><dt><b>Since:</b></dt><dd>1.2 </dd></dl>

</div>
</div>
<a class="anchor" id="a4ac854641fe28b16c5e01582d91e22dc"></a><!-- doxytag: member="Cairo::SvgSurface::restrict_to_version" ref="a4ac854641fe28b16c5e01582d91e22dc" args="(SvgVersion version)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Cairo::SvgSurface::restrict_to_version </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceCairo.html#a853a6353847b8cd86001a98d36b245ca">SvgVersion</a>&#160;</td>
          <td class="paramname"> <em>version</em></td>
          <td>&#160;)&#160;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Restricts the generated SVG file to the given version. </p>
<p>See <a class="el" href="classCairo_1_1SvgSurface.html#a25403772072f28f7c40e6478332babaa" title="Retrieves the list of SVG versions supported by cairo.">get_versions()</a> for a list of available version values that can be used here.</p>
<p>This function should only be called before any drawing operations have been performed on the given surface. The simplest way to do this is to call this function immediately after creating the surface.</p>
<dl class="since"><dt><b>Since:</b></dt><dd>1.2 </dd></dl>

</div>
</div>
<a class="anchor" id="a3a15a5df131a8ef6cc8786342c7e6dfc"></a><!-- doxytag: member="Cairo::SvgSurface::version_to_string" ref="a3a15a5df131a8ef6cc8786342c7e6dfc" args="(SvgVersion version)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00237.html">std::string</a> Cairo::SvgSurface::version_to_string </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceCairo.html#a853a6353847b8cd86001a98d36b245ca">SvgVersion</a>&#160;</td>
          <td class="paramname"> <em>version</em></td>
          <td>&#160;)&#160;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the string representation of the given version id. </p>
<p>The returned string will be empty if version isn't valid. See <a class="el" href="classCairo_1_1SvgSurface.html#a25403772072f28f7c40e6478332babaa" title="Retrieves the list of SVG versions supported by cairo.">get_versions()</a> for a way to get the list of valid version ids.</p>
<p>since: 1.2 </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>cairomm/surface.h</li>
</ul>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Dec 30 2010 22:31:50 for cairomm by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>