Graphics::Grid::Grob - Role for graphical object (grob) classes in Graphics::Grid
version 0.001
This is the role for graphical object (grob) classes.
A viewport object. When drawing a grob, if the grob has this attribute, the viewport would be temporily pushed onto the global viewport stack before drawing takes place, and be poped after drawing. If the grob does not have this attribute set, it would be drawn on the existing current viewport in the global viewport stack.
Get number of sub-elements in the grob.
Grob classes shall implement a _build_elems() method to support this attribute.
_build_elems()
Generate a unique name for a grob.
This is an alias of elems.
elems
Returns info about the grob's extents (bounding box, etc) on the drawing layer, in cm.
Note that not all grob classes have got this method implemented.
This would call $grid->draw($self), which would further call the grob's _draw method.
$grid->draw($self)
_draw
A hook to allow a grob class to modify its vp before being drawn.
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.