Graphics::Grid::Layout - layout
version 0.001
use Graphics::Grid::Functions qw(:all); sub testlay { my $just = shift // "center"; push_viewport(viewport( layout => grid_layout( nrow => 1, ncol => 1, widths => unit(1, "inches"), heights => unit(0.25, "npc"), just => $just))); push_viewport(viewport(layout_pos_col => 0, layout_pos_row => 0)); grid_rect(); grid_text($just); pop_viewport(2) } for my $just (qw(center left_top right_top right_bottom left_bottom left right bottom top)) { testplay($just); }
A grid layout describes a subdivision of a rectangular region.
Number of rows in the layout.
Number of columns in the layout.
Boolean value for whether row heights and column widths should respect each other.
Returns the width of a cell.
Returns the height of a cell.
Returns the width of the layout (sum of widths) as a Graphics::Grid::UnitArithmetic object.
widths
Returns the height of the layout (sum of heights) as a Graphics::Grid::UnitArithmetic object.
heights
Graphics::Grid
Stephan Loyd <sloyd@cpan.org>
This software is copyright (c) 2018-2023 by Stephan Loyd.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Graphics::Grid, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Graphics::Grid
CPAN shell
perl -MCPAN -e shell install Graphics::Grid
For more information on module installation, please visit the detailed CPAN module installation guide.