<!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>The hasCurrentPoint purpose</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="cairocontext.glyphpath.html">CairoContext::glyphPath</a></div> <div class="next" style="text-align: right; float: right;"><a href="cairocontext.identitymatrix.html">CairoContext::identityMatrix</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.hascurrentpoint" class="refentry"> <div class="refnamediv"> <h1 class="refname">CairoContext::hasCurrentPoint</h1> <h1 class="refname">cairo_has_current_point</h1> <p class="verinfo">(PECL cairo >= 0.1.0)</p><p class="refpurpose"><span class="refname">CairoContext::hasCurrentPoint</span> -- <span class="refname">cairo_has_current_point</span> — <span class="dc-title">The hasCurrentPoint purpose</span></p> </div> <div class="refsect1 description" id="refsect1-cairocontext.hascurrentpoint-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">bool</span> <span class="methodname"><strong>CairoContext::hasCurrentPoint</strong></span> ( <span class="methodparam">void</span> )</div> <p class="para rdfs-comment">Procedural style:</p> <div class="methodsynopsis dc-description"> <span class="type">bool</span> <span class="methodname"><strong>cairo_has_current_point</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> )</div> <p class="para rdfs-comment"> Returns whether a current point is defined on the current path. See <span class="methodname"><a href="cairocontext.getcurrentpoint.html" class="methodname">CairoContext::getCurrentPoint()</a></span> for details on the current point. </p> </div> <div class="refsect1 parameters" id="refsect1-cairocontext.hascurrentpoint-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"> A valid <a href="class.cairocontext.html" class="classname">CairoContext</a> object. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-cairocontext.hascurrentpoint-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Whether a current point is defined </p> </div> <div class="refsect1 examples" id="refsect1-cairocontext.hascurrentpoint-examples"> <h3 class="title">Examples</h3> <p class="para"> <div class="example" id="example-2919"> <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 />$s </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">100</span><span style="color: #007700">, </span><span style="color: #0000BB">100</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$c </span><span style="color: #007700">= new </span><span style="color: #0000BB">CairoContext</span><span style="color: #007700">(</span><span style="color: #0000BB">$s</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$c</span><span style="color: #007700">-></span><span style="color: #0000BB">hasCurrentPoint</span><span style="color: #007700">());<br /><br /></span><span style="color: #0000BB">$c</span><span style="color: #007700">-></span><span style="color: #0000BB">moveTo</span><span style="color: #007700">(</span><span style="color: #0000BB">10</span><span style="color: #007700">, </span><span style="color: #0000BB">10</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$c</span><span style="color: #007700">-></span><span style="color: #0000BB">hasCurrentPoint</span><span style="color: #007700">());<br /><br /></span><span style="color: #0000BB">?></span> </span> </code></div> </div> <div class="example-contents"><p>The above example will output:</p></div> <div class="example-contents screen"> <div class="cdata"><pre> bool(false) bool(true) </pre></div> </div> </div> </p> <p class="para"> <div class="example" id="example-2920"> <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 />$s </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_SURFACE_TYPE_IMAGE</span><span style="color: #007700">, </span><span style="color: #0000BB">100</span><span style="color: #007700">, </span><span style="color: #0000BB">100</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$c </span><span style="color: #007700">= </span><span style="color: #0000BB">cairo_create</span><span style="color: #007700">(</span><span style="color: #0000BB">$s</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">cairo_has_current_point</span><span style="color: #007700">(</span><span style="color: #0000BB">$c</span><span style="color: #007700">));<br /><br /></span><span style="color: #0000BB">cairo_move_to</span><span style="color: #007700">(</span><span style="color: #0000BB">$c</span><span style="color: #007700">, </span><span style="color: #0000BB">10</span><span style="color: #007700">, </span><span style="color: #0000BB">10</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">cairo_has_current_point</span><span style="color: #007700">(</span><span style="color: #0000BB">$c</span><span style="color: #007700">));<br /><br /></span><span style="color: #0000BB">?></span> </span> </code></div> </div> <div class="example-contents"><p>The above example will output:</p></div> <div class="example-contents screen"> <div class="cdata"><pre> bool(false) bool(true) </pre></div> </div> </div> </p> </div> <div class="refsect1 seealso" id="refsect1-cairocontext.hascurrentpoint-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"> <span class="methodname"><a href="cairocontext.getcurrentpoint.html" class="methodname" rel="rdfs-seeAlso">CairoContext::getCurrentPoint()</a> - The getCurrentPoint purpose</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="cairocontext.glyphpath.html">CairoContext::glyphPath</a></div> <div class="next" style="text-align: right; float: right;"><a href="cairocontext.identitymatrix.html">CairoContext::identityMatrix</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>