<!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>Computes the filled area</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="cairocontext.fill.html">CairoContext::fill</a></div> <div class="next" style="text-align: right; float: right;"><a href="cairocontext.fillpreserve.html">CairoContext::fillPreserve</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.fillextents" class="refentry"> <div class="refnamediv"> <h1 class="refname">CairoContext::fillExtents</h1> <h1 class="refname">cairo_fill_extents</h1> <p class="verinfo">(PECL cairo >= 0.1.0)</p><p class="refpurpose"><span class="refname">CairoContext::fillExtents</span> -- <span class="refname">cairo_fill_extents</span> — <span class="dc-title">Computes the filled area</span></p> </div> <div class="refsect1 description" id="refsect1-cairocontext.fillextents-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">array</span> <span class="methodname"><strong>CairoContext::fillExtents</strong></span> ( <span class="methodparam">void</span> )</div> <p class="para rdfs-comment">Procedural style:</p> <div class="methodsynopsis dc-description"> <span class="type">array</span> <span class="methodname"><strong>cairo_fill_extents</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"> Computes a bounding box in user coordinates covering the area that would be affected, (the “inked” area), by a <span class="methodname"><a href="cairocontext.fill.html" class="methodname">CairoContext::fill()</a></span> operation given the current path and fill parameters. If the current path is empty, returns an empty rectangle (0,0,0,0). Surface dimensions and clipping are not taken into account. </p> <p class="para"> Contrast with <span class="methodname"><a href="cairocontext.pathextents.html" class="methodname">CairoContext::pathExtents()</a></span>, which is similar, but returns non-zero extents for some paths with no inked area, (such as a simple line segment). </p> <p class="para"> Note that <span class="methodname"><strong>CairoContext::fillExtents()</strong></span> must necessarily do more work to compute the precise inked areas in light of the fill rule, so <span class="methodname"><a href="cairocontext.pathextents.html" class="methodname">CairoContext::pathExtents()</a></span> may be more desirable for sake of performance if the non-inked path extents are desired. </p> </div> <div class="refsect1 parameters" id="refsect1-cairocontext.fillextents-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 created with <span class="methodname"><a href="cairocontext.construct.html" class="methodname">CairoContext::__construct()</a></span> or <span class="function"><a href="function.cairo-create.html" class="function">cairo_create()</a></span> </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-cairocontext.fillextents-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> An array with the coordinates of the afected area </p> </div> <div class="refsect1 examples" id="refsect1-cairocontext.fillextents-examples"> <h3 class="title">Examples</h3> <p class="para"> <div class="example" id="example-2873"> <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 /></span><span style="color: #FF8000">/* ... */<br /></span><span style="color: #0000BB">?></span> </span> </code></div> </div> <div class="example-contents"><p>The above example will output something similar to:</p></div> <div class="example-contents screen"> <div class="cdata"><pre> ... </pre></div> </div> </div> </p> <p class="para"> <div class="example" id="example-2874"> <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 /></span><span style="color: #FF8000">/* ... */<br /></span><span style="color: #0000BB">?></span> </span> </code></div> </div> <div class="example-contents"><p>The above example will output something similar to:</p></div> <div class="example-contents screen"> <div class="cdata"><pre> ... </pre></div> </div> </div> </p> </div> <div class="refsect1 seealso" id="refsect1-cairocontext.fillextents-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"> <span class="methodname"><a href="cairocontext.fill.html" class="methodname" rel="rdfs-seeAlso">CairoContext::fill()</a> - Fills the current path</span></li> <li class="member"> <span class="methodname"><a href="cairocontext.setfillrule.html" class="methodname" rel="rdfs-seeAlso">CairoContext::setFillRule()</a> - The setFillRule purpose</span></li> <li class="member"> <span class="methodname"><a href="cairocontext.fillpreserve.html" class="methodname" rel="rdfs-seeAlso">CairoContext::fillPreserve()</a> - Fills and preserve 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="cairocontext.fill.html">CairoContext::fill</a></div> <div class="next" style="text-align: right; float: right;"><a href="cairocontext.fillpreserve.html">CairoContext::fillPreserve</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>