SWF::Builder::Shape - SWF shape object
my $shape = $mc->new_shape ->fillstyle('ff0000') ->linestyle(1, '000000') ->moveto(0,-11) ->lineto(10,6) ->lineto(-10,6) ->lineto(0,-11); my @bbox = $shape->get_bbox;
SWF shape is defined by a list of edges.
returns a new shape.
sets line width and color. The color can take a six or eight-figure hexadecimal string, an array reference of R, G, B, and optional alpha value, an array reference of named parameters such as [Red => 255], and SWF::Element::RGB/RGBA object. If you set the style 'none', edges are not drawn.
sets a fill style.
$color is a solid fill color. See $shape->linestyle for the acceptable color value.
$gradient is a gradient object. Give $type 'radial' to fill with radial gradient, otherwise linear. $matrix is a matrix to transform the gradient. See SWF::Builder::Gradient.
$bitmap is a bitmap character. Give $type 'clipped' to fill with clipped bitmap, otherwise tiled. $matrix is a matrix to transform the bitmap. See SWF::Builder::Bitmap.
identical to $shape->fillstyle.
sets an additional fillstyle used in self-overlap shape.
moves the draw point to ($x, $y).
moves the draw point to ( current X + $dx, current Y + $dy ).
draws a line from the current draw point to ($x, $y)
draws a line from the current draw point to ( current X + $dx, current Y + $dy ).
draws a quadratic bezier curve from the current draw point to ($ax, $ay) using ($cx, $cy) as the control point.
draws a quadratic bezier curve from the current draw point to (current X + $cdx+$adx, current Y + $cdy+$ady) using (current X + $cdx, current Y + $cdy) as the control point.
draws a box. The draw point is moved to ($x1, $y1) after drawing.
returns the bounding box of the shape, a list of coordinates ( top-left X, top-left Y, bottom-right X, bottom-right Y ).
returns the display instance of the shape. See SWF::Builder.
Copyright 2003 Yasuhiro Sasama (ySas), <ysas@nmt.ne.jp>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install SWF::Builder, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SWF::Builder
CPAN shell
perl -MCPAN -e shell install SWF::Builder
For more information on module installation, please visit the detailed CPAN module installation guide.