GDTextUtil
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
sub new
{
my $proto = shift;
my $class = ref($proto) || $proto;
my $self = {
type => 'builtin',
font => gdSmallFont,
ptsize => 10,
};
bless $self => $class;
$self->set(@_) or return;
return $self
}
=head2 GD::Text::error() or $gd_text->error();
Return the last error that occured in the class. This may be
imperfect.
=cut
Text/Align.pm view on Meta::CPAN
{
my $proto = shift;
my $class = ref($proto) || $proto;
my $gd = shift;
ref($gd) and $gd->isa('GD::Image')
or croak "Not a GD::Image object";
my $self = $class->SUPER::new() or return;
$self->{gd} = $gd;
$self->_init();
$self->set(@_);
bless $self => $class;
}
my %defaults = (
halign => 'left',
valign => 'base',
);
sub _init
{
my $self = shift;
Text/Wrap.pm view on Meta::CPAN
=cut
sub new
{
my $proto = shift;
my $class = ref($proto) || $proto;
my $gd = shift;
ref($gd) and $gd->isa('GD::Image')
or croak "Not a GD::Image object";
my $self = { gd => $gd };
bless $self => $class;
$self->_init();
$self->set(@_);
return $self
}
sub _init
{
my $self = shift;
$self->{render} = GD::Text::Align->new($self->{gd}, text => 'Foo');
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.905 second using v1.00-cache-2.02-grep-82fe00e-cpan-a086c87fca4 )