SYNOPSIS
DESCRIPTION
METHODS
new
use Grid::Layout;
my $gl = Grid::Layout->new();
_init_V_or_H
$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.
add_vertical_track
add_horizontal_track
_add_track
_add_line
$self->_add_line($V_or_H);
Internal function, called by "_add_track", to add a vertical or horizontal Grid::Layout::Line.
area
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;
size_x
my $x = $gl->size_x();
Returns the horizontal size (x axis) in logical cell units.
size_y
my $y = $gl->size_y();
Returns the vertical size (y axis) in logical cell units.
size
Returns size of grid (nof vertical tracks x nof horizontal tracks);
my ($v, $h) = $gl -> size();
_size
Internal use.
cell
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.
_add_cell
Internal use.
line_x
my $line = $gl->line_x($postition);
Returns the $position
th line in horizontal direction.
line_y
my $line = $gl->line_y($postition);
Returns the $position
th line in vertical direction.
_line
my $line = $gl->_line($V_or_H, $position)
Returns the $position
th line in vertical or horizontal direction.
VH_opposite
my $o1 = Grid::Layout::VH_opposite('H');
my $02 = Grid::Layout::VH_opposite('V');
Static method. Returns 'V'
if passed 'H'
and vice versa.