<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Appends a path to current path</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="class.cairocontext.html">CairoContext</a></div> <div class="next" style="text-align: right; float: right;"><a href="cairocontext.arc.html">CairoContext::arc</a></div> <div class="up"><a href="class.cairocontext.html">CairoContext</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="cairocontext.appendpath" class="refentry"> <div class="refnamediv"> <h1 class="refname">CairoContext::appendPath</h1> <h1 class="refname">cairo_append_path</h1> <p class="verinfo">(PECL cairo >= 0.1.0)</p><p class="refpurpose"><span class="refname">CairoContext::appendPath</span> -- <span class="refname">cairo_append_path</span> — <span class="dc-title">Appends a path to current path</span></p> </div> <div class="refsect1 description" id="refsect1-cairocontext.appendpath-description"> <h3 class="title">Description</h3> <p class="para">Object oriented style (method):</p> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type"><span class="type void">void</span></span> <span class="methodname"><strong>CairoContext::appendPath</strong></span> ( <span class="methodparam"><span class="type"><a href="class.cairopath.html" class="type CairoPath">CairoPath</a></span> <code class="parameter">$path</code></span> )</div> <p class="para rdfs-comment">Procedural style:</p> <div class="methodsynopsis dc-description"> <span class="type"><span class="type void">void</span></span> <span class="methodname"><strong>cairo_append_path</strong></span> ( <span class="methodparam"><span class="type"><a href="class.cairocontext.html" class="type CairoContext">CairoContext</a></span> <code class="parameter">$context</code></span> , <span class="methodparam"><span class="type"><a href="class.cairopath.html" class="type CairoPath">CairoPath</a></span> <code class="parameter">$path</code></span> )</div> <p class="para rdfs-comment"> Appends the <em><code class="parameter">path</code></em> onto the current path. The <em><code class="parameter">path</code></em> may be either the return value from one of <span class="methodname"><a href="cairocontext.copypath.html" class="methodname">CairoContext::copyPath()</a></span> or <span class="methodname"><a href="cairocontext.copypathflat.html" class="methodname">CairoContext::copyPathFlat()</a></span>; </p> <p class="para"> if <em><code class="parameter">path</code></em> is not a valid <a href="class.cairopath.html" class="classname">CairoPath</a> instance a <a href="class.cairoexception.html" class="classname">CairoException</a> will be thrown </p> </div> <div class="refsect1 parameters" id="refsect1-cairocontext.appendpath-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">context</code></em></span> <dd> <p class="para"> CairoContext object </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">path</code></em></span> <dd> <p class="para"> CairoPath object </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-cairocontext.appendpath-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> No value is returned. </p> </div> <div class="refsect1 examples" id="refsect1-cairocontext.appendpath-examples"> <h3 class="title">Examples</h3> <p class="para"> <div class="example" id="example-2846"> <p><strong>Example #1 Object oriented style</strong></p> <div class="example-contents"> <div class="phpcode"><code><span style="color: #000000"> <span style="color: #0000BB"><?php<br /><br />$surface </span><span style="color: #007700">= new </span><span style="color: #0000BB">CairoImageSurface</span><span style="color: #007700">(</span><span style="color: #0000BB">CairoFormat</span><span style="color: #007700">::</span><span style="color: #0000BB">ARGB32</span><span style="color: #007700">, </span><span style="color: #0000BB">50</span><span style="color: #007700">, </span><span style="color: #0000BB">50</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$context </span><span style="color: #007700">= new </span><span style="color: #0000BB">CairoContext</span><span style="color: #007700">(</span><span style="color: #0000BB">$surface</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$path </span><span style="color: #007700">= </span><span style="color: #0000BB">$context</span><span style="color: #007700">-></span><span style="color: #0000BB">copyPath</span><span style="color: #007700">();<br /><br /></span><span style="color: #0000BB">$context</span><span style="color: #007700">-></span><span style="color: #0000BB">appendPath</span><span style="color: #007700">(</span><span style="color: #0000BB">$path</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">?></span> </span> </code></div> </div> </div> </p> <p class="para"> <div class="example" id="example-2847"> <p><strong>Example #2 Procedural style</strong></p> <div class="example-contents"> <div class="phpcode"><code><span style="color: #000000"> <span style="color: #0000BB"><?php<br /><br />$surface </span><span style="color: #007700">= </span><span style="color: #0000BB">cairo_image_surface_create</span><span style="color: #007700">(</span><span style="color: #0000BB">CAIRO_FORMAT_ARGB32</span><span style="color: #007700">, </span><span style="color: #0000BB">50</span><span style="color: #007700">, </span><span style="color: #0000BB">50</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$context </span><span style="color: #007700">= </span><span style="color: #0000BB">cairo_create</span><span style="color: #007700">(</span><span style="color: #0000BB">$surface</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$path </span><span style="color: #007700">= </span><span style="color: #0000BB">cairo_copy_path</span><span style="color: #007700">(</span><span style="color: #0000BB">$context</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">cairo_append_path</span><span style="color: #007700">(</span><span style="color: #0000BB">$context</span><span style="color: #007700">, </span><span style="color: #0000BB">$path</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">?></span> </span> </code></div> </div> </div> </p> </div> <div class="refsect1 seealso" id="refsect1-cairocontext.appendpath-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"><a href="class.cairopath.html" class="classname">CairoPath</a></li> <li class="member"> <span class="methodname"><a href="cairocontext.copypath.html" class="methodname" rel="rdfs-seeAlso">CairoContext::copyPath()</a> - Creates a copy of the current path</span></li> <li class="member"> <span class="methodname"><a href="cairocontext.copypathflat.html" class="methodname" rel="rdfs-seeAlso">CairoContext::copyPathFlat()</a> - Gets a flattened copy of the current path</span></li> </ul> </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="class.cairocontext.html">CairoContext</a></div> <div class="next" style="text-align: right; float: right;"><a href="cairocontext.arc.html">CairoContext::arc</a></div> <div class="up"><a href="class.cairocontext.html">CairoContext</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>