December 2002
Beginner
478 pages
17h 55m
English
A gradient consists of a list of color values, each value with a set position. The gradient can be scaled to fill a given region and can appear as a linear gradient or a radial gradient (illustrated back in Figure 9-4). The color of the points between the two defined end points gradually transforms from the color of the first point to the color of the second.
A gradient is constructed by adding color entries at particular positions:
my $gradient = new SWF::Gradient( ); $gradient->addEntry(0.0, 255, 0, 0); $gradient->addEntry(1.0, 255,255,255); my $fill = $s->addFill($gradient); $fill->scaleTo(.1); # A method of the SWF::Fill object
See The SWF::Fill Module for additional methods for controlling gradient fills.
Read now
Unlock full access