Class ImageLayout2
Object
ImageLayout
ImageLayout2
- All Implemented Interfaces:
Serializable,Cloneable
public class ImageLayout2
extends ImageLayout
Extends the standard ImageN
ImageLayout to provide a reliable hash function. ImageLayout has a bug
that will cause an application to crash if doing hashing when some fields have not been initialized.- Since:
- 1.1
- Author:
- Simone Giannecchini, GeoSolutions S.A.S., Daniele Romagnoli, GeoSolutions S.A.S.
- See Also:
-
ImageLayout- Serialized Form
-
Field Summary
Fields inherited from class ImageLayout
COLOR_MODEL_MASK, HEIGHT_MASK, MIN_X_MASK, MIN_Y_MASK, SAMPLE_MODEL_MASK, TILE_GRID_X_OFFSET_MASK, TILE_GRID_Y_OFFSET_MASK, TILE_HEIGHT_MASK, TILE_WIDTH_MASK, WIDTH_MASK -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.ImageLayout2(int minX, int minY, int width, int height) Construct anImageLayout2with only the image's properties set.ImageLayout2(int minX, int minY, int width, int height, int tileGridXOffset, int tileGridYOffset, int tileWidth, int tileHeight, SampleModel sampleModel, ColorModel colorModel) Construct anImageLayout2with the parameter set.ImageLayout2(int tileGridXOffset, int tileGridYOffset, int tileWidth, int tileHeight, SampleModel sampleModel, ColorModel colorModel) Construct anImageLayout2with only tiling layout properties, sampleModel and colorModel set.Construct anImageLayout2on top of a RenderedImage. -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()Returns the hash code for thisImageLayout2.Methods inherited from class ImageLayout
clone, getColorModel, getHeight, getMinX, getMinY, getSampleModel, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, getValidMask, getWidth, isValid, setColorModel, setHeight, setMinX, setMinY, setSampleModel, setTileGridXOffset, setTileGridYOffset, setTileHeight, setTileWidth, setValid, setWidth, toString, unsetImageBounds, unsetTileLayout, unsetValid
-
Constructor Details
-
ImageLayout2
public ImageLayout2()Default constructor. Constructs anImageLayout2without any parameter set. -
ImageLayout2
public ImageLayout2(int minX, int minY, int width, int height, int tileGridXOffset, int tileGridYOffset, int tileWidth, int tileHeight, SampleModel sampleModel, ColorModel colorModel) Construct anImageLayout2with the parameter set.- Parameters:
minX- the image's minimum X coordinate.minY- the image's minimum X coordinate.width- the image's width.height- the image's height.tileGridXOffset- the x coordinate of the tile (0,0)tileGridYOffset- the y coordinate of the tile (0,0)tileWidth- the tile's width.tileHeight- the tile's height.sampleModel- the image'sSampleModelcolorModel- the image'sColorModel
-
ImageLayout2
public ImageLayout2(int tileGridXOffset, int tileGridYOffset, int tileWidth, int tileHeight, SampleModel sampleModel, ColorModel colorModel) Construct anImageLayout2with only tiling layout properties, sampleModel and colorModel set.- Parameters:
tileGridXOffset- the x coordinate of the tile (0,0)tileGridYOffset- the y coordinate of the tile (0,0)tileWidth- the tile's width.tileHeight- the tile's height.sampleModel- the image'sSampleModelcolorModel- the image'sColorModel
-
ImageLayout2
public ImageLayout2(int minX, int minY, int width, int height) Construct anImageLayout2with only the image's properties set.- Parameters:
minX- the image's minimum X coordinate.minY- the image's minimum X coordinate.width- the image's width.height- the image's height.
-
ImageLayout2
Construct anImageLayout2on top of a RenderedImage. The layout parameters are set from the related values of the input image.- Parameters:
im- aRenderedImagewhose layout will be copied.
-
-
Method Details
-
hashCode
public int hashCode()Returns the hash code for thisImageLayout2. With respect to the superImageLayout, this method also does validity check on the parameters during hashing.- Overrides:
hashCodein classImageLayout
-
equals
- Overrides:
equalsin classImageLayout
-