SWF::Fill - SWF fill class
use SWF::Fill; usw SWF::Shape; $shape = new SWF::Shape(); $fill = $shape->addGradientFill($gradient,SWFFILL_LINEAR_GRADIENT);
There is no object constructor because SWF::Fill objects are always returned by method calls of SWF::Shape objects, like
$fill = $shape->addSolidFill($r, $g, $b, $a); $fill = $shape->addGradientFill($gradient, flags); $fill = $shape->addBitmapFill($bitmap, $flag);
You can now modify that SWF::Fill object using following methods.
None of the following methods is designed or useful for solid fill objects, because it does not make any sense to rotate or scale a solid fill.
Move $fill to ($x, $y) in global co-ordinates.
Set $fill scale to $x in the x-direction and $y in the y-direction. If $y is not specified, $y=$x is assumed.
Multiply $fill scale by $x in the x-direction and $y in the y-direction. If $y is not specified, $y=$x is assumed.
rotateTo($degrees)
Set $fill rotation to $degrees.
rotate($degrees)
Rotate $fill by $degrees.
skewX($x)
Add $x to the current x-skew.
skewXTo($x)
Set x-skew to $x. 1.0 is 45-degree forward slant. More is more forward while less is more backward.
skewY($y)
Add $y to the current y-skew.
skewYTo($y)
Set y-skew to $y. 1.0 is 45-degree upward slant. More is more upward while less is more downward.
Do an operation of rotating/skewing (b,c), moving (e,f) and scaling (a,d) at once. The default initial values of an SWF::Fill object's matrix are 1.0, 0, 0, 1.0, 0, 0 . So calling setMatrix with these defaults (setMatrix(1.0, 0, 0, 1.0, 0, 0);) will reset results of earlier calls of SWF::Fill methods (like rotate(45) etc. etc.)
developers of ming.sourceforge.net
SWF, SWF::Shape, SWF::DisplayItem, SWF::Constants