SWFShape

(PHP 4 >= 4.0.5)

SWFShape -- 新規に輪郭オブジェクトを作成する

説明

new swfshape ( void )

警告

この関数は、 実験的なステータスにあります。これは、この関数の 動作、関数名、ここで書かれていること全てがPHPの将来のバージョンで予告 なく変更される可能性があることを意味します。注意を喚起するとともに自分 のリスクでこの関数を使用して下さい。

swfshape() creates a new shape object.

SWFShape has the following methods : swfshape->setline(), swfshape->addfill(), swfshape->setleftfile(), swfshape->setrightfile(), swfshape->movepento(), swfshape->movepen(), swfshape->drawlineto(), swfshape->drawline(), swfshape->drawcurveto() et 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();
?>