public class TLcdClippedTile extends Object implements ILcdTile, ILcdDisposable
ILcdTile
represents a specified rectangle of a given tile
as a new tile.Constructor and Description |
---|
TLcdClippedTile(ILcdTile aTile,
int aX,
int aY,
int aWidth,
int aHeight)
Creates a new TLcdClippedTile.
|
Modifier and Type | Method and Description |
---|---|
Image |
createImage()
Creates an image of the entire tile, using the tile's own color model.
|
Image |
createImage(ColorModel aColorModel)
Creates an image of the entire tile, using the given color model.
|
Image |
createImage(int aX,
int aY,
int aWidth,
int aHeight)
Creates an image of the specified rectangular area of the tile, using the
tile's own color model.
|
Image |
createImage(int aX,
int aY,
int aWidth,
int aHeight,
ColorModel aColorModel)
Creates an image of the specified rectangular area of the tile, using the
given color model.
|
void |
dispose()
Disposes of this object and allows it to release any system resources that it is holding.
|
ColorModel |
getColorModel()
Returns the optional color model of the tile.
|
int |
getHeight()
Returns the height of the tile, expressed in pixels.
|
int |
getPixelSize()
Returns the pixel size of the tile values, expressed in bits.
|
ILcdTile |
getTile() |
int |
getType()
Returns the internal storage type of the tile values.
|
int |
getWidth()
Returns the width of the tile, expressed in pixels.
|
boolean |
isAllDefault()
Returns whether all values in the tile are equal to a default value.
|
int |
retrieveValue(int aX,
int aY)
Retrieves the tile value at the specified location.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
public TLcdClippedTile(ILcdTile aTile, int aX, int aY, int aWidth, int aHeight)
aTile
- the tile from which the contents will be retrieved.aX
- the x ordinate of the clipped tile in the original tile,
expressed in pixels.aY
- the y ordinate of the clipped tile in the original tile,
expressed in pixels.aWidth
- the width of the clipped tile, expressed in pixels.aHeight
- the height of the clipped tile, expressed in pixels.public ILcdTile getTile()
public int getWidth()
ILcdTile
public int getHeight()
ILcdTile
public int getType()
ILcdTile
public int getPixelSize()
ILcdTile
getPixelSize
in interface ILcdTile
public ColorModel getColorModel()
ILcdTile
getColorModel
in interface ILcdTile
null
if the raster doesn't have
an explicit color model.public boolean isAllDefault()
ILcdTile
isAllDefault
in interface ILcdTile
public int retrieveValue(int aX, int aY)
ILcdTile
retrieveValue
in interface ILcdTile
aX
- the x ordinate of the value, expressed in tile coordinates.aY
- the y ordinate of the value, expressed in tile coordinates.public Image createImage()
ILcdTile
createImage
in interface ILcdTile
public Image createImage(ColorModel aColorModel)
ILcdTile
createImage
in interface ILcdTile
aColorModel
- the color model to be used for the image. The color
model should be compatible with the pixel values of
the tile.public Image createImage(int aX, int aY, int aWidth, int aHeight)
ILcdTile
createImage
in interface ILcdTile
aX
- the x ordinate of the area, expressed in tile coordinates.aY
- the y ordinate of the area, expressed in tile coordinates.aWidth
- the width of the area, expressed in tile coordinates.aHeight
- the height of the area, expressed in tile coordinates.public Image createImage(int aX, int aY, int aWidth, int aHeight, ColorModel aColorModel)
ILcdTile
createImage
in interface ILcdTile
aX
- the x ordinate of the area, expressed in tile coordinates.aY
- the y ordinate of the area, expressed in tile coordinates.aWidth
- the width of the area, expressed in tile coordinates.aHeight
- the height of the area, expressed in tile coordinates.aColorModel
- the color model to be used for the image. The color
model should be compatible with the pixel values of
the tile.public void dispose()
ILcdDisposable
Disposes of this object and allows it to release any system resources that it is holding.
The result of calling any other method (other than finalize
) on this object subsequent to a call to
this method is undefined.
dispose
in interface ILcdDisposable