Class RenderingWorkaround
java.lang.Object
org.apache.sis.internal.map.coverage.RenderingWorkaround
- All Implemented Interfaces:
RenderedImage
Workaround for the bug in calls to
Graphics2D.drawRenderedImage(…)
when the image is tiled and some tiles are not writable.- Since:
- 1.2
- Version:
- 1.2
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateRenderingWorkaround(RenderedImage image) Creates a new wrapper for the given image. -
Method Summary
Modifier and TypeMethodDescriptiongetData()intintintintgetMinX()intgetMinY()intintgetProperty(String name) String[]getTile(int tx, int ty) intintintintintgetWidth()private static RasterReturns the given raster as an instance ofWritableRaster.static RenderedImagewrap(RenderedImage image) Applies workaround for JDK-8275345 if needed.
-
Field Details
-
image
The image to render.
-
-
Constructor Details
-
RenderingWorkaround
Creates a new wrapper for the given image.
-
-
Method Details
-
wrap
Applies workaround for JDK-8275345 if needed.- Parameters:
image- the image on which to apply the workaround.- Returns:
- image that can be used for rendering purpose.
-
getSources
- Specified by:
getSourcesin interfaceRenderedImage
-
getProperty
- Specified by:
getPropertyin interfaceRenderedImage
-
getPropertyNames
- Specified by:
getPropertyNamesin interfaceRenderedImage
-
getColorModel
- Specified by:
getColorModelin interfaceRenderedImage
-
getSampleModel
- Specified by:
getSampleModelin interfaceRenderedImage
-
getWidth
public int getWidth()- Specified by:
getWidthin interfaceRenderedImage
-
getHeight
public int getHeight()- Specified by:
getHeightin interfaceRenderedImage
-
getMinX
public int getMinX()- Specified by:
getMinXin interfaceRenderedImage
-
getMinY
public int getMinY()- Specified by:
getMinYin interfaceRenderedImage
-
getNumXTiles
public int getNumXTiles()- Specified by:
getNumXTilesin interfaceRenderedImage
-
getNumYTiles
public int getNumYTiles()- Specified by:
getNumYTilesin interfaceRenderedImage
-
getMinTileX
public int getMinTileX()- Specified by:
getMinTileXin interfaceRenderedImage
-
getMinTileY
public int getMinTileY()- Specified by:
getMinTileYin interfaceRenderedImage
-
getTileWidth
public int getTileWidth()- Specified by:
getTileWidthin interfaceRenderedImage
-
getTileHeight
public int getTileHeight()- Specified by:
getTileHeightin interfaceRenderedImage
-
getTileGridXOffset
public int getTileGridXOffset()- Specified by:
getTileGridXOffsetin interfaceRenderedImage
-
getTileGridYOffset
public int getTileGridYOffset()- Specified by:
getTileGridYOffsetin interfaceRenderedImage
-
getTile
- Specified by:
getTilein interfaceRenderedImage
-
getData
- Specified by:
getDatain interfaceRenderedImage
-
getData
- Specified by:
getDatain interfaceRenderedImage
-
copyData
- Specified by:
copyDatain interfaceRenderedImage
-
wrap
Returns the given raster as an instance ofWritableRaster. The underlying data buffer is shared, not copied.
-