-
-
14 Aug 2016 16:01:35 UTC
- Distribution: CSS-SpriteMaker
- Module version: 0.02
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues (0)
- Testers (24 / 5 / 0)
- Kwalitee
Bus factor: 0- 87.50% Coverage
- License: perl_5
- Perl: v5.6.0
- Activity
24 month- Tools
- Download (89.86KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- File::Find
- Getopt::Long
- Image::Magick
- Module::Pluggable
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
CSS::SpriteMaker::Layout::FixedDimension
my $FixedDimensionLayout = CSS::SpriteMaker::Layout::FixedDimension->new( # example $rh_item_info input structure { "1" => { width => 128, height => 128, }, ... }, # max 10 items on the same row, { dimension => 'horizontal', n => 10 }, );
Layout maximum n items on a row.
Items are chosen at random.
Input $rh_item_info structure must contain the following keys for this layout to produce a result:
- width : the width in pixels of the image;
- height : the height in pixels of the image;
The following input parameters must be specified:
- n : number of maximum items to place on the same row
The following input parameters are optional:
- dimension: can be 'horizontal' (default) or 'vertical'.
VERSION
Version 0.02
new
Instantiates the layout:
my $FixedDimensionLayout = CSS::SpriteMaker::Layout::FixedDimension->new( $rh_item_info, { dimension => 'vertical' # 'horizontal' is the default n => 10 # compulsory! } );
_layout_items
Module Install Instructions
To install CSS::SpriteMaker, copy and paste the appropriate command in to your terminal.
cpanm CSS::SpriteMaker
perl -MCPAN -e shell install CSS::SpriteMaker
For more information on module installation, please visit the detailed CPAN module installation guide.