downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

SWFShape->drawGlyph> <SWFShape->drawCurve
Last updated: Fri, 20 May 2011

view this page in

SWFShape->drawCurveTo

(PHP 4 >= 4.0.5)

SWFShape->drawCurveToDibuja una curva

Descripción

int SWFShape::drawCurveTo ( float $controlx , float $controly , float $anchorx , float $anchory [, float $targetx ], float $targety )
Warning

Esta función ha sido declarada EXPERIMENTAL. Su comportamiento, su nombre y la documentación que le acompaña puede cambiar sin previo aviso en futuras versiones de PHP. Use esta función bajo su propio riesgo.

swfshape->drawcurveto() dibuja una curva cuadrática (usando el estilo de línea actual establecido por swfshape->setline()) desde la posición actual de la pluma hasta (anchorx,anchory) usando (controlx,controly) como punto de control. Esto es, la cabeza hacia el punto de control, después gira al punto de anclaje.

Con 6 parámetros dibuja una curva bezier cúbica al punto (targetx, targety) con los puntos de control (controlx, controly) y (anchorx, anchory).

Ver también



add a note add a note User Contributed Notes SWFShape->drawCurveTo
Chris 30-Jun-2005 07:28
for those new this all this, "anchor" is where you want to end up and "control" is the point you would go to if you were drawing a square.

for example, this would draw a quarter circle
<?php
    $s
->movePenTo(100, 100);
   
$s->drawLineTo(200, 100);
   
$s->drawCurveTo(200, 200, 100, 200);
   
$s->drawLineTo(100, 100);
?>

 
show source | credits | stats | sitemap | contact | advertising | mirror sites