PHP Velho Oeste 2024

SWFShape::drawCurveTo

(PHP 5 < 5.3.0, PECL ming SVN)

SWFShape::drawCurveToTrace une courbe

Description

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

Cette fonction est EXPERIMENTALE. Le comportement de cette fonction, son nom, et toute la documentation autour de cette fonction peut changer sans préavis dans une prochaine version de PHP. Cette fonction doit être utilisée à vos risques et périls.

swfshape::drawcurveto() trace une courbe (en utilisant le style de la ligne courante, défini par la fonction swfshape::setline()) depuis la position courante du stylo vers (anchorx,anchory) en utilisant le point de contrôle (controlx,controly).

Avec 6 paramètres, elle trace une courbe de Bézier vers le point (targetx, targety) avec les points de contrôle (controlx, controly) et (anchorx, anchory).

Voir aussi

  • SWFShape::drawCurveTo()

add a note add a note

User Contributed Notes 1 note

up
0
Chris
18 years ago
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);
?>
To Top