PHP 手冊
前一頁 |  | 下一頁

# 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(40, 0x7f, 0, 0); $s->setRightFill($s->addFill(0xff, 0, 0)); $s->movePenTo(200, 200); $s->drawLineTo(6200, 200); $s->drawLineTo(6200, 4600); $s->drawCurveTo(200, 4600, 200, 200); $m = new SWFMovie(); $m->setDimension(6400, 4800); $m->setRate(12.0); $m->add($s); $m->nextFrame(); header('Content-type: application/x-shockwave-flash'); $m->output(); ?>`

前一頁 | 內容 | 下一頁
SWFShape->setRightFill | 上一層 | swfsprite->add