Term-Caca
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Term/Caca/Bitmap.pm view on Meta::CPAN
our $AUTHORITY = 'cpan:YANICK';
#ABSTRACT: an OO-interface to caca_bitmap
$Term::Caca::Bitmap::VERSION = '3.1.0';
use strict;
use warnings;
use Term::Caca;
sub new {
my ($class, $bpp, $w, $h, $pitch, $rmask, $gmask, $bmask, $amask) = @_;
my $self = Term::Caca::_create_bitmap($bpp, $w, $h, $pitch, $rmask, $gmask, $bmask, $amask);
return bless($self => $class);
}
sub set_palette {
my ($self, $red, $green, $blue, $alpha) = @_;
return Term::Caca::_set_bitmap_palette($self, $red, $green, $blue, $alpha);
}
sub draw {
my ($self, $x1, $y1, $x2, $y2, $pixels) = @_;
return Term::Caca::_draw_bitmap_tied($x1, $y1, $x2, $y2, $self, $pixels);
lib/Term/Caca/Sprite.pm view on Meta::CPAN
our $AUTHORITY = 'cpan:YANICK';
#ABSTRACT: an OO-interface to caca_sprite
$Term::Caca::Sprite::VERSION = '3.1.0';
use strict;
use warnings;
use Term::Caca;
sub new {
my ($class, $file) = @_;
my $self = Term::Caca::_load_sprite($file);
return bless($self => $class);
}
*load = \*new;
sub get_frames {
my ($self) = @_;
return Term::Caca::_get_sprite_frames($self);
}
sub get_width {
view all matches for this distributionview release on metacpan - search on metacpan
( run in 1.264 second using v1.00-cache-2.02-grep-82fe00e-cpan-9e6bc14194b6 )