Interface java.awt.image.renderable.RenderableImage
- Implementing Classes:
- RenderableImageOp
- public interface RenderableImage
A RenderableImage is a common interface for rendering-independent
images (a notion which subsumes resolution independence). That is,
images which are described and have operations applied to them
independent of any specific rendering of the image. For example, a
RenderableImage can be rotated and cropped in
resolution-independent terms. Then, it can be rendered for various
specific contexts, such as a draft preview, a high-quality screen
display, or a printer, each in an optimal fashion.
A RenderedImage is returned from a RenderableImage via the getImage()
method, which takes a RenderContext. The RenderContext specifies
how the RenderedImage should be constructed. Note that it is not
possible to extract pixels directly from a RenderableImage.
The getDefaultRendering() and getScaledRendering() methods are
convenience methods that construct an appropriate RenderContext
internally.
getSources
public Vector getSources()
- Returns a vector of RenderableImages that are the sources of
Image data for this RenderableImage. Note that this method will
often return an empty vector.
- Returns:
- a Vector of RenderableImages.
getProperty
public Object getProperty(String name)
- Gets a property from the property set of this image.
- Parameters:
name
- the name of the property to get, as a String.
- Returns:
- a reference to the property Object.
getPropertyNames
public String[] getPropertyNames()
- Return a list of names recognized by getProperty(String).
getWidth
public float getWidth()
- Gets the width in user coordinate space. The default width
and height for image sources should be 1 unit high, by aspect
ratio wide.
- Returns:
- the width of the image in user coordinates.
getHeight
public float getHeight()
- Gets the height in user coordinate space. The default width
and height for image sources should be 1 unit high, by aspect
ratio wide.
- Returns:
- the height of the image in user coordinates.
getMinXCoord
public float getMinXCoord()
- Gets the minimum X coordinate for image data. Be aware that a
RenderableImage may have "infinite" extent, in which case this
function will return -Float.MAX_VALUE.
- Returns:
- The minimum X coordinate of the rendering-independent image.
getMaxXCoord
public float getMaxXCoord()
- Gets the maxumum X coordinate for image data. Be aware that a
RenderableImage may have "infinite" extent, in which case this
function will return Float.MAX_VALUE.
- Returns:
- The maximum X coordinate of the rendering-independent image.
getMinYCoord
public float getMinYCoord()
- Gets the minimum Y coordinate for image data. Be aware that a
RenderableImage may have "infinite" extent, in which case this
function will return -Float.MAX_VALUE.
- Returns:
- The minimum Y coordinate of the rendering-independent image.
getMaxYCoord
public float getMaxYCoord()
- Gets the maximum Y coordinate for image data. Be aware that a
RenderableImage may have "infinite" extent, in which case this
function will return Float.MAX_VALUE.
- Returns:
- The maximum Y coordinate of the rendering-independent image.
getScaledRendering
public RenderedImage getScaledRendering(int w,
int h,
Hashtable hints)
- Gets a RenderedImage instance of this image with width w, and
height h in pixels. The RenderContext is built automatically
with an appropriate usr2dev transform and an area of interest
of the full image. All the rendering hints come from hints
passed in.
- Parameters:
w
- the width of rendered image in pixels.
h
- the height of rendered image in pixels.
hints
- a Hashtable of Hints to use during rendering.
- Returns:
- a RenderedImage containing the rendered data.
getDefaultRendering
public RenderedImage getDefaultRendering()
- Gets a RenderedImage instance of this image with a default
width and height in pixels. The RenderContext is built
automatically with an appropriate usr2dev transform and an area
of interest of the full image. All the rendering hints come
from hints passed in. Implementors of this interface must be
sure that there is a defined default width and height.
- Returns:
- a RenderedImage containing the rendered data.
getImage
public RenderedImage getImage(RenderContext renderContext)
- Gets a RenderedImage instance of this image from a
RenderContext. This is the most general way to obtain a
rendering of a RenderableImage.
- Parameters:
renderContext
- the RenderContext to use to produce the rendering.
- Returns:
- a RenderedImage containing the rendered data.
Submit a bug or feature
Submit comments/suggestions about new javadoc look.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.