CSS::SpriteMaker::Layout::DirectoryBased
my $DirectoryBasedLayout = CSS::SpriteMaker::Layout::DirectoryBased->new( { "1" => { width => 128, height => 128, pathname => '/full/path/to/file1.png', parentdir => '/full/path/to', }, ... } );
Layout items based on the directory they are contained in and their filename.
All items contained in the same sub directory are cascaded on the same row of the layout.
Input hashref items must contain the following keys for this layout to produce a result:
- pathname : the full pathname of the file;
- width : the width in pixels of the image;
- height : the height in pixels of the image;
- parentdir: the full pathname of the parent directory the image is contained in.
Version 0.02
Instantiates the layout:
my $DirectoryBasedLayout = CSS::SpriteMaker::Layout::DirectoryBased->new( $rh_item_info );
To install CSS::SpriteMaker, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CSS::SpriteMaker
CPAN shell
perl -MCPAN -e shell install CSS::SpriteMaker
For more information on module installation, please visit the detailed CPAN module installation guide.