use Grid::Layout; my $gl = Grid::Layout->new();
$self->_init_V_or_H('V'); $self->_init_V_or_H('H');
This method is called by "new" twice to initialize the vertical and the horizontal components of the layout.
The parameter 'V' or 'H' indiciates which componenents to initialize.
'V'
'H'
$self->_add_line($V_or_H);
Internal function, called by "_add_track", to add a vertical or horizontal Grid::Layout::Line.
my $vertical_track_from = $gl->add_vertical_track(…); my $horizontal_track_from = $gl->add_vertical_track(…); my $vertical_track_to = $gl->add_vertical_track(…); my $horizontal_track_to = $gl->add_vertical_track(…); my $area = $gl->area($vertical_track_from, $horizontal_track_from, $vertical_track_to, $vertical_track_to);
Define an Area bound by the four Tracks;
my $x = $gl->size_x();
Returns the horizontal size (x axis) in logical cell units.
my $y = $gl->size_y();
Returns the vertical size (y axis) in logical cell units.
Returns size of grid (nof vertical tracks x nof horizontal tracks);
my ($v, $h) = $gl -> size();
Internal use.
my $track_v = $gl->add_vertical_track(…); my $track_h = $gl->add_horizontal_track(…); my $cell_1 = $gl->cell($x, $y); my $cell_2 = $gl->cell($track_v, $track_h);
Return the Grid::Layout::Cell at horizontal position $x and vertical position $y or where $track_v and $track_h intersects.
$x
$y
$track_v
$track_h
my $line = $gl->line_x($postition);
Returns the $positionth line in horizontal direction.
$position
my $line = $gl->line_y($postition);
Returns the $positionth line in vertical direction.
my $line = $gl->_line($V_or_H, $position)
Returns the $positionth line in vertical or horizontal direction.
my $o1 = Grid::Layout::VH_opposite('H'); my $02 = Grid::Layout::VH_opposite('V');
Static method. Returns 'V' if passed 'H' and vice versa.
To install Grid::Layout, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Grid::Layout
CPAN shell
perl -MCPAN -e shell install Grid::Layout
For more information on module installation, please visit the detailed CPAN module installation guide.