<!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>Draws a curve (relative)</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="swfshape.drawcubicto.html">SWFShape::drawCubicTo</a></div> <div class="next" style="text-align: right; float: right;"><a href="swfshape.drawcurveto.html">SWFShape::drawCurveTo</a></div> <div class="up"><a href="class.swfshape.html">SWFShape</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="swfshape.drawcurve" class="refentry"> <div class="refnamediv"> <h1 class="refname">SWFShape::drawCurve</h1> <p class="verinfo">(PHP 4 >= 4.0.5)</p><p class="refpurpose"><span class="refname">SWFShape::drawCurve</span> — <span class="dc-title">Draws a curve (relative)</span></p> </div> <div class="refsect1 description" id="refsect1-swfshape.drawcurve-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">int</span> <span class="methodname"><strong>SWFShape::drawCurve</strong></span> ( <span class="methodparam"><span class="type">float</span> <code class="parameter">$controldx</code></span> , <span class="methodparam"><span class="type">float</span> <code class="parameter">$controldy</code></span> , <span class="methodparam"><span class="type">float</span> <code class="parameter">$anchordx</code></span> , <span class="methodparam"><span class="type">float</span> <code class="parameter">$anchordy</code></span> [, <span class="methodparam"><span class="type">float</span> <code class="parameter">$targetdx</code></span> ], <span class="methodparam"><span class="type">float</span> <code class="parameter">$targetdy</code></span> )</div> <div class="warning"><strong class="warning">Warning</strong><p class="simpara">This function is <em class="emphasis">EXPERIMENTAL</em>. The behaviour of this function, its name, and surrounding documentation may change without notice in a future release of PHP. This function should be used at your own risk. </p></div> <p class="simpara"> <span class="function"><strong>swfshape::drawcurve()</strong></span> draws a quadratic curve (using the current line style,set by <span class="function"><a href="swfshape.setline.html" class="function">swfshape::setline()</a></span>) from the current pen position to the relative position (<em><code class="parameter">anchorx</code></em>,<em><code class="parameter">anchory</code></em>) using relative control point (<em><code class="parameter">controlx</code></em>,<em><code class="parameter">controly</code></em>). That is, head towards the control point, then smoothly turn to the anchor point. </p> <p class="simpara"> With 6 parameters, it draws a cubic bezier to point (x+<em><code class="parameter">targetdx</code></em>, x+<em><code class="parameter">targetdy</code></em>) with control points (x+<em><code class="parameter">controldx</code></em>, y+<em><code class="parameter">controldy</code></em>) and (x+<em><code class="parameter">anchordx</code></em>, y+<em><code class="parameter">anchordy</code></em>). </p> </div> <div class="refsect1 seealso" id="refsect1-swfshape.drawcurve-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"> <span class="function"><strong>SWFShape::drawCurve()</strong></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="swfshape.drawcubicto.html">SWFShape::drawCubicTo</a></div> <div class="next" style="text-align: right; float: right;"><a href="swfshape.drawcurveto.html">SWFShape::drawCurveTo</a></div> <div class="up"><a href="class.swfshape.html">SWFShape</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>