Package org.apache.sis.coverage.grid
Class ImageRenderer.Untiled
java.lang.Object
java.awt.Image
java.awt.image.BufferedImage
org.apache.sis.coverage.grid.ImageRenderer.Untiled
- All Implemented Interfaces:
RenderedImage,WritableRenderedImage,Transparency
- Enclosing class:
- ImageRenderer
A
BufferedImage which will compute the "org.apache.sis.GridGeometry"
property when first needed. We use this class even when the property value is known in advance because it
has the desired side-effect of not letting BufferedImage.getSubimage(int, int, int, int) inherit that property.
The use of a BufferedImage subclass is desired because Java2D rendering pipeline has optimizations
in the form if (image instanceof BufferedImage).-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate GridGeometryThe value associated to the "org.apache.sis.GridGeometry" key, ornullif not yet computed.private SliceGeometryThe object to use for computinggeometry, ornullif not needed.Fields inherited from class java.awt.image.BufferedImage
TYPE_3BYTE_BGR, TYPE_4BYTE_ABGR, TYPE_4BYTE_ABGR_PRE, TYPE_BYTE_BINARY, TYPE_BYTE_GRAY, TYPE_BYTE_INDEXED, TYPE_CUSTOM, TYPE_INT_ARGB, TYPE_INT_ARGB_PRE, TYPE_INT_BGR, TYPE_INT_RGB, TYPE_USHORT_555_RGB, TYPE_USHORT_565_RGB, TYPE_USHORT_GRAYFields inherited from class java.awt.Image
accelerationPriority, SCALE_AREA_AVERAGING, SCALE_DEFAULT, SCALE_FAST, SCALE_REPLICATE, SCALE_SMOOTH, UndefinedPropertyFields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT -
Constructor Summary
ConstructorsConstructorDescriptionUntiled(ColorModel colors, WritableRaster raster, Hashtable<?, ?> properties, GridGeometry geometry, SliceGeometry supplier) Creates a new buffered image wrapping the given raster. -
Method Summary
Modifier and TypeMethodDescriptiongetProperty(String key) Returns the property associated to the given key.String[]Returns the names of properties that this image can provide.Methods inherited from class java.awt.image.BufferedImage
addTileObserver, coerceData, copyData, createGraphics, getAlphaRaster, getColorModel, getData, getData, getGraphics, getHeight, getHeight, getMinTileX, getMinTileY, getMinX, getMinY, getNumXTiles, getNumYTiles, getProperty, getRaster, getRGB, getRGB, getSampleModel, getSource, getSources, getSubimage, getTile, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, getTransparency, getType, getWidth, getWidth, getWritableTile, getWritableTileIndices, hasTileWriters, isAlphaPremultiplied, isTileWritable, releaseWritableTile, removeTileObserver, setData, setRGB, setRGB, toStringMethods inherited from class java.awt.Image
flush, getAccelerationPriority, getCapabilities, getScaledInstance, setAccelerationPriority
-
Field Details
-
geometry
The value associated to the "org.apache.sis.GridGeometry" key, ornullif not yet computed. -
supplier
-
-
Constructor Details
-
Untiled
Untiled(ColorModel colors, WritableRaster raster, Hashtable<?, ?> properties, GridGeometry geometry, SliceGeometry supplier) Creates a new buffered image wrapping the given raster.
-
-
Method Details
-
getPropertyNames
Returns the names of properties that this image can provide.- Specified by:
getPropertyNamesin interfaceRenderedImage- Overrides:
getPropertyNamesin classBufferedImage
-
getProperty
Returns the property associated to the given key. If the key is "org.apache.sis.GridGeometry", then theGridGeometrywill be computed when first needed.- Specified by:
getPropertyin interfaceRenderedImage- Overrides:
getPropertyin classBufferedImage- Throws:
ImagingOpException- if the property value cannot be computed.
-