NAME
App::MathImage::Image::Base::Imager -- draw images using Imager
SYNOPSIS
use App::MathImage::Image::Base::Imager;
my $image = App::MathImage::Image::Base::Imager->new (-width => 100,
-height => 100);
$image->rectangle (0,0, 99,99, 'white');
$image->xy (20,20, 'black');
$image->line (50,50, 70,70, '#FF00FF');
$image->line (50,50, 70,70, '#0000AAAA9999');
$image->save ('/some/filename.png');
CLASS HIERARCHY
App::MathImage::Image::Base::Imager
is a subclass of Image::Base
,
Image::Base
App::MathImage::Image::Base::Imager
DESCRIPTION
App::MathImage::Image::Base::Imager
extends Image::Base
to create or update image files using the Image::Imager
module.
Colour names are any name recognised by Imager::Color
. As of Imager 1.011 this means the GIMP Named_Colors or X11 rgb.txt names, or a hex "#RGB", "#RRGGBB".
FUNCTIONS
$image = App::MathImage::Image::Base::Imager->new (key=>value,...)
-
Create and return a new image object. A new image can be started with
-width
and-height
,$image = App::MathImage::Image::Base::Imager->new (-width => 200, -height => 100);
Or an existing file can be read,
$image = App::MathImage::Image::Base::Imager->new (-file => '/some/filename.png');
Or an
Image::Imager
object can be given,$image = App::MathImage::Image::Base::Imager->new (-imager => $iobj);
ATTRIBUTES
-width
(integer)-height
(integer)-
Setting these changes the size of the image.
-imager
-
The underlying
Image::Imager
object.
SEE ALSO
Image::Base::GD, Image::Base::PNGwriter, Image::Xbm, Image::Xpm, Image::Pbm