SWFShape

(PHP 4 >= 4.0.5)

SWFShape -- Creates a new shape object

Description

SWFShape swfshape ( void )

警示

本函數是實驗性的。本函數的行為,內含函數名稱以及其它任何關於本函數的文件可能會在沒有知會的情況下隨 PHP 以後的發佈而改變。使用本函數風險自擔。

swfshape() creates a new shape object.

SWFShape has the following methods : swfshape->setline(), swfshape->addfill(), swfshape->setleftfill(), swfshape->setrightfill(), swfshape->movepento(), swfshape->movepen(), swfshape->drawlineto(), swfshape->drawline(), swfshape->drawcurveto() and swfshape->drawcurve().

This simple example will draw a big red elliptic quadrant.

例子 1. swfshape() example

<?php
  $s 
= new SWFShape();
  
$s->setLine(400x7f00);
  
$s->setRightFill($s->addFill(0xff00));
  
$s->movePenTo(200200);
  
$s->drawLineTo(6200200);
  
$s->drawLineTo(62004600);
  
$s->drawCurveTo(2004600200200);

  
$m = new SWFMovie();
  
$m->setDimension(64004800);
  
$m->setRate(12.0);
  
$m->add($s);
  
$m->nextFrame();

  
header('Content-type: application/x-shockwave-flash');
  
$m->output();
?>