Graphics::Primitive::Image - Image component


Graphics-Primitive documentation Contained in the Graphics-Primitive distribution.

Index


Code Index:

NAME

Top

Graphics::Primitive::Image - Image component

DESCRIPTION

Top

Graphics::Primitive::Image is a Component that displays in image.

SYNOPSIS

Top

  use Graphics::Primitive::Image;

  my $img = Graphics::Primitive::Image->new(
      image => '/path/to/filename'
  );

WARNING

Top

THIS COMPONENT IS EXPERIMENTAL.

METHODS

Top

Constructor

new

Creates a new Graphics::Primitive::Image.

Instance Methods

horizontal_alignment

Set/Get the horizontal alignment of this component's image.

image

Set/Get the filename of this components image.

vertical_alignment

Set/Get the vertical alignment of this component's image.

AUTHOR

Top

Cory Watson, <gphat@cpan.org>

COPYRIGHT & LICENSE

Top


Graphics-Primitive documentation Contained in the Graphics-Primitive distribution.

package Graphics::Primitive::Image;
use Moose;
use MooseX::Storage;

extends 'Graphics::Primitive::Component';

with qw(MooseX::Clone Graphics::Primitive::Aligned);
with Storage (format => 'JSON', io => 'File');

has image => (
    is => 'rw',
    isa => 'Str'
);
has scale => (
    is => 'rw',
    isa => 'ArrayRef',
);

__PACKAGE__->meta->make_immutable;

1;
__END__