com.xmlmind.fo.graphic
Interface Graphic

All Known Implementing Classes:
GraphicImpl

public interface Graphic

Represents a graphic file.

The implementations of this interface are not expected to be shared between threads.


Field Summary
static int TYPE_RASTER
          This graphic is of the raster type.
static int TYPE_RASTERIZABLE
          This graphic is of the vector type but it will be rendered as a raster during the conversion.
static int TYPE_VECTOR
          This graphic is of the vector type and it cannot be rasterized.
 
Method Summary
 Object getClientData()
          Returns opaque client data associated to this graphic.
 String getFormat()
          Returns the MIME type of this graphic.
 int getHeight()
          Returns the height in pixels of this graphic.
 String getLocation()
          Returns the location of this graphic file.
 int getType()
          Returns the type of this graphic.
 int getWidth()
          Returns the width in pixels of this graphic.
 double getXResolution()
          Returns the horizontal resolution in DPI if known; a negative or null number otherwise.
 double getYResolution()
          Returns the vertical resolution in DPI if known; a negative or null number otherwise.
 

Field Detail

TYPE_VECTOR

static final int TYPE_VECTOR
This graphic is of the vector type and it cannot be rasterized. Example: EMF.

Vector graphics are never prescaled.

See Also:
Converter.setProperty(java.lang.String, java.lang.String), Constant Field Values

TYPE_RASTER

static final int TYPE_RASTER
This graphic is of the raster type. Example: PNG.

Raster graphics may be prescaled depending the value of the value of the prescaleImages Converter property.

See Also:
Converter.setProperty(java.lang.String, java.lang.String), Constant Field Values

TYPE_RASTERIZABLE

static final int TYPE_RASTERIZABLE
This graphic is of the vector type but it will be rendered as a raster during the conversion. Example: SVG.

Rasterizable graphics are always prescaled (by the proper renderer such as Batik; not by XMLmind XSL-FO Converter).

See Also:
Converter.setProperty(java.lang.String, java.lang.String), Constant Field Values
Method Detail

getLocation

String getLocation()
Returns the location of this graphic file. This location is always an URL in its string form. It may be a "data:" URL.


getFormat

String getFormat()
Returns the MIME type of this graphic. Example: "image/x-wmf".


getWidth

int getWidth()
Returns the width in pixels of this graphic.


getHeight

int getHeight()
Returns the height in pixels of this graphic.


getXResolution

double getXResolution()
Returns the horizontal resolution in DPI if known; a negative or null number otherwise.

IMPORTANT: this number should reflect exactly the information stored in the source located by getLocation().


getYResolution

double getYResolution()
Returns the vertical resolution in DPI if known; a negative or null number otherwise.

IMPORTANT: this number should reflect exactly the information stored in the source located by getLocation().


getType

int getType()
Returns the type of this graphic.

See Also:
TYPE_VECTOR, TYPE_RASTER, TYPE_RASTERIZABLE

getClientData

Object getClientData()
Returns opaque client data associated to this graphic. May return null.