/usr/share/doc/perl-Image-Base
Edit: /usr/share/doc/perl-Image-Base/README (4848B)
=head1 NAME
Image::Base - base class for loading, manipulating and saving images.
=head1 SYNOPSIS
This class should not be used directly. Known inheritors are Image::Xbm and
Image::Xpm.
use Image::Xpm ;
my $i = Image::Xpm->new( -file => 'test.xpm' ) ;
$i->line( 1, 1, 3, 7, 'red' ) ;
$i->ellipse( 3, 3, 6, 7, '#ff00cc' ) ;
$i->rectangle( 4, 2, 9, 8, 'blue' ) ;
If you want to create your own algorithms to manipulate images in terms of
(x,y,colour) then you could extend this class (without changing the file),
like this:
# Filename: mylibrary.pl
package Image::Base ; # Switch to this class to build on it.
sub mytransform {
my $self = shift ;
my $class = ref( $self ) || $self ;
# Perform your transformation here; might be drawing a line or filling
# a rectangle or whatever... getting/setting pixels using $self->xy().
}
package main ; # Switch back to the default package.
Now if you C
mylibrary.pl after you've C