Prima::ImageViewer - standard image, icon, and bitmap viewer class.
The module contains Prima::ImageViewer class, which provides image displaying functionality, including different zoom levels.
Prima::ImageViewer
Prima::ImageViewer is a descendant of Prima::ScrollWidget and inherits its document scrolling behavior and programming interface. See Prima::ScrollWidget for details.
Prima::ScrollWidget
One of the following ta::XXX constants:
ta::XXX
ta::Left ta::Center ta::Right
Selects the horizontal image alignment.
Default value: ta::Left
ta::Left
Selects the image object to be displayed. OBJECT can be an instance of Prima::Image, Prima::Icon, or Prima::DeviceBitmap class.
Prima::Image
Prima::Icon
Prima::DeviceBitmap
Set the image FILE to be loaded and displayed. Is rarely used since does not return a loading success flag.
A boolean flag, selecting if the palette of image is to be copied into the widget palette, providing higher visual quality on paletted displays. See also "palette" in Prima::Widget.
image
Default value: 1
ta::Top ta::Middle or ta::Center ta::Bottom
Selects the vertical image alignment.
NB: ta::Middle value is not equal to ta::Center's, however the both constants produce equal effect here.
ta::Middle
ta::Center
Default value: ta::Bottom
ta::Bottom
Selects zoom level for image display. The acceptable value range is between 0.02 and 100. The zoom value is rounded to fiftieth and twentieth fractional values - .02, .04, .05, .06, .08, and 0.1 .
Performs translation of integer pairs integers as (X,Y)-points from widget coordinates to pixel offset in image coordinates. Takes in account zoom level, image alignments, and offsets. Returns array of same length as the input.
Useful for determining correspondence, for example, of a mouse event to a image point.
The reverse function is point2screen.
point2screen
Performs translation of integer pairs as (X,Y)-points from image pixel offset to widget image coordinates. Takes in account zoom level, image alignments, and offsets. Returns array of same length as the input.
Useful for determining a screen location of an image point.
The reverse function is screen2point.
screen2point
Dmitry Karasik, <dmitry@karasik.eu.org>.
Prima, Prima::Image, Prima::ScrollWidget, examples/iv.pl.
To install Prima, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Prima
CPAN shell
perl -MCPAN -e shell install Prima
For more information on module installation, please visit the detailed CPAN module installation guide.