ePages 7.0.0 - DE_EPAGES/Presentation/Scripts/Sprites/SpriteComposer.pm

Package DE_EPAGES::Presentation::Scripts::Sprites::SpriteComposer

Program to compose a single image from several particular smaller images together with CSS classes to address them. See also: http://spritegen.website-performance.org/ http://www.alistapart.com/articles/sprites http://www.alistapart.com/articles/fir/ http://www.smashingmagazine.com/2009/04/27/the-mystery-of-css-sprites-techniques-tools-and-tutorials/

Example
my $Sprite = DE_EPAGES::Presentation::Scripts::Sprites::SpriteComposer->new(
    'configfilevalues'  => $hConfigParams,
    'imagedir'          => $IconsPath,
    'generatetest'      => $GenerateTestHTMLFile,
    'cartridge'         => $CartridgeName,
    'de_epages_dir'     => $EpagesCartridges.'/DE_EPAGES',
    'storetyperoot'     => $StoreTypeRoot,
    'targetfile'        => $TargetFileName
);
$Sprite->generateSpriteImage

Functions

generateSpriteImage
new

generateSpriteImage

Entry point of the package. Call this method to generate a Sprite image file together with the css sprites with the coordinates and a test case with html and css. Moreover optimize the image file size.

Syntax
$aResultFiles = $Sprite->generateSpriteImage;
Return
$aResultFiles (ref.array.string)
list of file names of generated files

new

Maps parameters from the command line and the config file and stores the attributes as member variables.

Syntax
$Sprite = DE_EPAGES::Presentation::Scripts::Sprites::SpriteComposer->new(%CommandLineOptions);
Input
%CommandLineOptions (hash)
hash with command line options
Return
$Sprite (DE_EPAGES::Presentation::Scripts::Sprites::SpriteComposer)
new SpriteComposer object