The SWF::Fill Module

Each Fill object must be associated with a particular Shape object and cannot be used interchangeably with other Shapes. Because of this, there is no explicit constructor for a Fill. A new Fill object is returned by the SWF::Shape::addFill( ) method. Fills can be one of three types: solid color (with or without an alpha channel), gradient, or bitmap. A gradient fill can be either linear or radial, and a bitmap fill can be tiled to fill the region, or clipped to fit the region.

The following constants are defined by this module:

SWFFILL_SOLID
SWFFILL_GRADIENT
SWFFILL_LINEAR_GRADIENT
SWFFILL_RADIAL_GRADIENT
SWFFILL_BITMAP
SWFFILL_TILED_BITMAP
SWFFILL_CLIPPED_BITMAP

The SWF::Fill module defines five methods that may be used to move the origin of the fill or to transform the fill. None of these methods affect solid fills.

Get Perl Graphics Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.