org.pentaho.reporting.engine.classic.core
Interface ImageContainer

All Superinterfaces:
Cloneable
All Known Subinterfaces:
LocalImageContainer, URLImageContainer
All Known Implementing Classes:
DefaultImageReference

public interface ImageContainer
extends Cloneable

A image container stores all layout information to process images in a report.

The ImageContainer is the common base interface for the URLImageContainer (which references remote images) and the LocalImageContainer (which references local AWT-Image instances).

All the layouting engine needs to know about images, are the image dimensions and the possible scale factor for the contained image. Only the content creators need the knowledge on how to access the contained image and and which other container types might exist.

Author:
Thomas Morgner

Method Summary
 int getImageHeight()
          Returns the unscaled height of the contained image.
 int getImageWidth()
          Returns the unscaled width of the contained image.
 float getScaleX()
          Defines the image's horizontal scale.
 float getScaleY()
          Defines the image's vertical scale.
 

Method Detail

getImageWidth

int getImageWidth()
Returns the unscaled width of the contained image. The width must be known during the layouting process, returning -1 to indicate an unknown size (as the AWT does) is not valid.

Returns:
the width of the image.

getImageHeight

int getImageHeight()
Returns the unscaled height of the contained image. The height must be known during the layouting process, returning -1 to indicate an unknown size (as the AWT does) is not valid.

Returns:
the height of the image.

getScaleX

float getScaleX()
Defines the image's horizontal scale. This is the factor to convert the image from it's original resolution to the java resolution of 72dpi.

This is not the scale that is computed by the layouter; that one is derived from the ImageContent itself.

Returns:
the horizontal scale.

getScaleY

float getScaleY()
Defines the image's vertical scale. This is the factor to convert the image from it's original resolution to the java resolution of 72dpi.

This is not the scale that is computed by the layouter; that one is derived from the ImageContent.

Returns:
the vertical scale.