4 CXGN::Cview::ImageI - an interface for top-level Cview images.
10 Lukas Mueller (lam87@cornell.edu)
19 package CXGN
::Cview
::ImageI
;
35 my $self = bless {}, $class;
37 # set some defaults...
39 $self->set_width(600);
40 $self->set_height(400);
45 =head2 function render
58 =head2 accessors get_width(), set_width()
60 Synopsis: $width = $ii->get_width()
61 Property: the width, in pixels, of the canvas
69 return $self->{width
};
78 =head2 accessors get_height(), set_height()
80 Synopsis: my $height = $ii->get_height()
81 Property: the height in pixels of the canvas
89 return $self->{height
};
94 $self->{height
}=shift;
97 =head2 accessors get_image(), set_image()
99 Synopsis: my $i = $ii->get_image()
100 Property: the GD::Image used for drawing on this canvas
108 return $self->{image
};
113 $self->{image
}=shift;
116 =head2 function add_image_object
126 sub add_image_object
{
129 if (!exists($self->{image_objects
})) { $self->{image_objects
}= []; }
130 push @
{$self->{image_objects
}}, $object;
133 =head2 function get_image_objects
143 sub get_image_objects
{
145 return @
{$self->{image_objects
}};
148 =head2 accessors get_name, set_name
160 return $self->{name
};
165 $self->{name
} = shift;