Image-Placeholder
view release on metacpan or search on metacpan
lib/Image/Placeholder.pm view on Meta::CPAN
package Image::Placeholder;
use Modern::Perl;
use Moose;
use MooseX::Method::Signatures;
use MooseX::FollowPBP;
use GD;
use version;
our $VERSION = qv( 1.0.0 );
use constant TRUE_COLOUR => 1;
use constant MAX_TRANSPARENCY => 127;
use constant MAX_USABLE_RATIO => 0.85;
has background_colour => (
isa => 'Str',
is => 'ro',
default => 'ddd',
);
has font => (
isa => 'Str',
is => 'ro',
default => 'Museo Sans',
);
has height => (
isa => 'Int',
is => 'ro',
);
has line_colour => (
isa => 'Str',
is => 'ro',
default => '444',
);
has size => (
isa => 'Str',
is => 'ro',
);
has text => (
isa => 'Str',
is => 'rw',
);
has text_colour => (
isa => 'Str',
is => 'ro',
default => '36f',
);
has transparent => (
isa => 'Bool',
is => 'ro',
default => 0,
);
has width => (
isa => 'Int',
is => 'ro',
default => '300',
);
method BUILD {
$self->set_size_from_string( $self->get_size() )
if defined $self->get_size();
$self->{'height'} = $self->get_width()
( run in 2.757 seconds using v1.01-cache-2.11-cpan-f56aa216473 )