Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Interface java.awt.image.RenderedImage

Subinterfaces:
WritableRenderedImage

public interface RenderedImage
A RenderedImage is a common interface for objects which contain or can produce image data in the form of Rasters.


Method Summary
ColorModel  getColorModel()
Return the ColorModel associated with this image.
Raster  getData()
Return the image as one large tile (for tile based images this will require fetching the whole image and copying the image data over).
int  getHeight()
Return the height of the RenderedImage.
int  getMaxTileX()
Return the index of the maximum tile in the X direction.
int  getMaxTileY()
Return the index of the maximum tile in the Y direction.
int  getMaxXCoord()
Return the maximum X coordinate (inclusive) of the rendered image.
int  getMaxYCoord()
Return the minimum Y coordinate (inclusive) of the rendered image.
int  getMinTileX()
Return the index of the minimum tile in the X direction.
int  getMinTileY()
Return the index of the minimum tile in the Y direction.
int  getMinXCoord()
Return the minimum X coordinate (inclusive) of the rendered image.
int  getMinYCoord()
Return the minimum Y coordinate (inclusive) of the rendered image.
Object  getProperty(String name)
Get a property from the property set of this image.
String[]  getPropertyNames()
Return a list of names recognized by getProperty(String).
Raster  getRect(Rectangle rect)
Compute and return an arbitrary region of the RenderedImage.
WritableRaster  getRect(WritableRaster raster)
Compute an arbitrary rectangular region of the RenderedImage and copy it into a caller-supplied WritableRaster.
SampleModel  getSampleModel()
Return the SampleModel associated with this image.
Vector  getSources()
Return a vector of RenderedImages that are the sources of image data for this RenderedImage.
Raster  getTile(int x, int y)
Return tile (X, Y).
int  getTileGridXOffset()
Return the X offset of the tile grid relative to the origin, i.e., the X coordinate of the upper-left pixel of tile (0, 0).
int  getTileGridYOffset()
Return the Y offset of the tile grid relative to the origin, i.e., the Y coordinate of the upper-left pixel of tile (0, 0).
int  getTileHeight()
Return the tile height in pixels.
int  getTileWidth()
Return the tile width in pixels.
int  getWidth()
Return the width of the RenderedImage.
int  tilesAcross()
Return the number of tiles across the image.
int  tilesDown()
Return the number of tiles down the image.
 

Method Detail

getSources

public Vector getSources()
Return a vector of RenderedImages that are the sources of image data for this RenderedImage. This method may return null.

getProperty

public Object getProperty(String name)
Get a property from the property set of this image. The set of properties is determined at construction time and is immutable.

getPropertyNames

public String[] getPropertyNames()
Return a list of names recognized by getProperty(String).

getColorModel

public ColorModel getColorModel()
Return the ColorModel associated with this image. All Rasters returned from this image will have this as their ColorModel.

getSampleModel

public SampleModel getSampleModel()
Return the SampleModel associated with this image. All Rasters returned from this image will have this as their SampleModel.

getWidth

public int getWidth()
Return the width of the RenderedImage. Equivalent to getMaxXCoord() - getMinXCoord() + 1.

getHeight

public int getHeight()
Return the height of the RenderedImage. Equivalent to getMaxYCoord() - getMinYCoord() + 1.

getMinXCoord

public int getMinXCoord()
Return the minimum X coordinate (inclusive) of the rendered image. For an image with infinite extent, it could be Integer.MIN_VALUE.

getMaxXCoord

public int getMaxXCoord()
Return the maximum X coordinate (inclusive) of the rendered image. For an image with infinite extent, it could be Integer.MAX_VALUE.

getMinYCoord

public int getMinYCoord()
Return the minimum Y coordinate (inclusive) of the rendered image. For an image with infinite extent, it could be Integer.MIN_VALUE.

getMaxYCoord

public int getMaxYCoord()
Return the minimum Y coordinate (inclusive) of the rendered image. For an image with infinite extent, it could be Integer.MAX_VALUE.

tilesAcross

public int tilesAcross()
Return the number of tiles across the image. Equivalent to getMaxTileX() - getMinTileX() + 1.

tilesDown

public int tilesDown()
Return the number of tiles down the image. Equivalent to getMaxTileY() - getMinTileY() + 1.

getMinTileX

public int getMinTileX()
Return the index of the minimum tile in the X direction.

getMaxTileX

public int getMaxTileX()
Return the index of the maximum tile in the X direction.

getMinTileY

public int getMinTileY()
Return the index of the minimum tile in the Y direction.

getMaxTileY

public int getMaxTileY()
Return the index of the maximum tile in the Y direction.

getTileWidth

public int getTileWidth()
Return the tile width in pixels. All tiles must have the same width.

getTileHeight

public int getTileHeight()
Return the tile height in pixels. All tiles must have the same height.

getTileGridXOffset

public int getTileGridXOffset()
Return the X offset of the tile grid relative to the origin, i.e., the X coordinate of the upper-left pixel of tile (0, 0).

getTileGridYOffset

public int getTileGridYOffset()
Return the Y offset of the tile grid relative to the origin, i.e., the Y coordinate of the upper-left pixel of tile (0, 0).

getTile

public Raster getTile(int x,
                      int y)
Return tile (X, Y). Note that X and Y are indices into the tile array, not pixel locations. The Raster that is returned is live and will be updated if the image is changed.
Parameters:
x - the X index of the requested tile in the tile array.
y - the Y index of the requested tile in the tile array.

getData

public Raster getData()
Return the image as one large tile (for tile based images this will require fetching the whole image and copying the image data over). The Raster returned is semantically a copy.

getRect

public Raster getRect(Rectangle rect)
Compute and return an arbitrary region of the RenderedImage. Note that in general this may involve copying image data. The Raster returned is semantically a copy.
Parameters:
rect - the region of the RenderedImage to be returned.

getRect

public WritableRaster getRect(WritableRaster raster)
Compute an arbitrary rectangular region of the RenderedImage and copy it into a caller-supplied WritableRaster. The region to be computed is determined from the bounds of the supplied WritableRaster. The supplied WritableRaster must have a ColorModel and SampleModel that are compatible with those of this image.
Parameters:
raster - a WritableRaster to hold the returned portion of the image.
Returns:
a reference to the supplied WritableRaster.

Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

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.