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

search for in the

SWFShape->drawGlyph> <SWFShape->drawCurve
Last updated: Fri, 10 Oct 2008

view this page in

SWFShape->drawCurveTo

(No version information available, might be only in CVS)

SWFShape->drawCurveTo曲線を描く

説明

int drawCurveTo ( int $controlx , int $controly , int $anchorx , int $anchory [, int $targetx ], int $targety )
警告

この関数は、 実験的 なものです。この関数の動作・ 名前・その他ドキュメントに書かれている事項は、予告なく、将来的な PHP のリリースにおいて変更される可能性があります。 この関数は自己責任で使用してください。

swfshape->drawcurveto() は、 (swfshape->setline() で設定した現在の線スタイルを 使用して) 現在のペンの位置から (anchorx ,anchory ) まで 制御点 (controlx ,controly ) を使用して 2 次曲線を描きます。つまり、制御点にまず向かった後で、 anchor 点までなめらかに戻ってくるということです。

6 つのパラメータを使用すると、点 (targetx , targety ) に向かって 制御点 (controlx , controly ) および (anchorx , anchory ). を使用して 3 次ベジエ曲線を描きます。



add a note add a note User Contributed Notes
SWFShape->drawCurveTo
Chris
30-Jun-2005 09: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);
?>

SWFShape->drawGlyph> <SWFShape->drawCurve
Last updated: Fri, 10 Oct 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites