Graphics::Primitive::Driver::GD - GD driver for Graphics::Primitive
use Graphics::Primitive::Component; use Graphics::Primitive::Driver::GD; my $container = Graphics::Primitive::Container->new( width => $form->sheet_width, height => $form->sheet_height ); $container->border->width(1); $container->border->color($black); $container->padding( Graphics::Primitive::Insets->new(top => 5, bottom => 5, left => 5, right => 5) ); my $comp = Graphics::Primitive::Component->new; $comp->background_color($black); $container->add_component($comp, 'c'); my $lm = Layout::Manager::Compass->new; $lm->do_layout($container); my $driver = Graphics::Primitive::Driver::GD->new; $driver->draw($container); $driver->write('/Users/gphat/foo.png');
This module is in it's early stages and does not work properly. It will be improved shortly.
Cory G Watson, <gphat at cpan.org>
<gphat at cpan.org>
Copyright 2009 Cory G Watson.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Graphics::Primitive::Driver::GD, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Graphics::Primitive::Driver::GD
CPAN shell
perl -MCPAN -e shell install Graphics::Primitive::Driver::GD
For more information on module installation, please visit the detailed CPAN module installation guide.