SWF::Shape - Shape class
use SWF::Shape; my $shape = new SWF::Shape();
SWF::Shape is the fundamental object of a flash movie.
Creates a new Shape object.
Move the Shape's (imaginary) pen location to ($x, $y) in the Shape's coordinate space.
Add ($dx, $dy) to the Shape's pen current location.
Returns Pen's x-coordinates
Returns Pen's y-coordinates
Returns Pen's (x,y) coordinates
Draw a line (using current line style - see "setLine()" method) from the current position to ($x, $y).
Draw a line (using current line style - see "setLine()" method) from the current position to displacement ($dx, $dy).
Draw a quadratic curve (using current line style - see "setLine()" method) from current pen position to ($anchorx, $anchory) using control point ($controlx, $controly).
Draw a quadratic curve (using current line style - see "setLine()" method) from current pen position to displacement ($anchordx, $anchordy) using displacement control point ($controldx, $controldy).
Sets Shape's line width and color (RGB). To remove the Shape's line style call this method without any arguments, i.e. $shape->setLine().
Adds a solid fill to $shape list of fill styles and returns an SWF::Fill object. This object is used with the "setLine()" method described below. The default value of $a is 0.
Adds a bitmap fill to $shape list of fill styles and returns an SWF::Fill object. This object is used with the "setLine()" method described below.
$bitmap is an SWF::Bitmap object while FLAG arguemnt can be SWFFILL_TILED_BITMAP or SWFFILL_CLIPPED_BITMAP. Make sure to import these constants to your package before useing it, i.e. use the following statement:
use SWF::Fill <list of constants>;
The default value of FLAG is SWFFILL_TILED_BITMAP.
Adds a gradient fill to $shape list of fill styles and returns an SWF::Fill object. This object is used with the "setLine()" method described below.
$gradient is an SWF::Gradient object while FLAG arguemnt can be SWFFILL_LINEAR_GRADIENT or SWFFILL_RADIAL_GRADIENT.Make sure to import these constants to your package before useing it, i.e. use the following statement:
The default value of FLAG is SWFFILL_LINEAR_GRADIENT.
Sets the fill on the left side of the edge. $fill is an SWF::Fill object returned from "addFill" method.
This is another way of saying:
my $fill = $shape->addSolidFill($r, $g, $b [,$a]); $shape->setLeftFill($fill);
Sets the fill on the right side of the edge. $fill is an SWF::Fill object returned from "addFill" method.
my $fill = $shape->addSolidFill($r, $g, $b [,$a]); $shape->setRightFill($fill);
Draws a circle with radious $r.
Soheil Seyfaie (soheil at users.sourceforge.net).
SWF, SWF::Action, SWF::Bitmap, SWF::Button, SWF::Constants, SWF::DisplayItem, SWF::Fill, SWF::Font, SWF::Gradient, SWF::Morph, SWF::Movie, SWF::MovieClip,SWF::Shape, SWF::Sound, SWF::TextField, SWF::Text
To install SWF, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SWF
CPAN shell
perl -MCPAN -e shell install SWF
For more information on module installation, please visit the detailed CPAN module installation guide.