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
ConstructorsModifierConstructorDescriptionprivate
RenderingWorkaround
(RenderedImage image) Creates a new wrapper for the given image. -
Method Summary
Modifier and TypeMethodDescriptiongetData()
int
int
int
int
getMinX()
int
getMinY()
int
int
getProperty
(String name) String[]
getTile
(int tx, int ty) int
int
int
int
int
getWidth()
private static Raster
Returns the given raster as an instance ofWritableRaster
.static RenderedImage
wrap
(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:
getSources
in interfaceRenderedImage
-
getProperty
- Specified by:
getProperty
in interfaceRenderedImage
-
getPropertyNames
- Specified by:
getPropertyNames
in interfaceRenderedImage
-
getColorModel
- Specified by:
getColorModel
in interfaceRenderedImage
-
getSampleModel
- Specified by:
getSampleModel
in interfaceRenderedImage
-
getWidth
public int getWidth()- Specified by:
getWidth
in interfaceRenderedImage
-
getHeight
public int getHeight()- Specified by:
getHeight
in interfaceRenderedImage
-
getMinX
public int getMinX()- Specified by:
getMinX
in interfaceRenderedImage
-
getMinY
public int getMinY()- Specified by:
getMinY
in interfaceRenderedImage
-
getNumXTiles
public int getNumXTiles()- Specified by:
getNumXTiles
in interfaceRenderedImage
-
getNumYTiles
public int getNumYTiles()- Specified by:
getNumYTiles
in interfaceRenderedImage
-
getMinTileX
public int getMinTileX()- Specified by:
getMinTileX
in interfaceRenderedImage
-
getMinTileY
public int getMinTileY()- Specified by:
getMinTileY
in interfaceRenderedImage
-
getTileWidth
public int getTileWidth()- Specified by:
getTileWidth
in interfaceRenderedImage
-
getTileHeight
public int getTileHeight()- Specified by:
getTileHeight
in interfaceRenderedImage
-
getTileGridXOffset
public int getTileGridXOffset()- Specified by:
getTileGridXOffset
in interfaceRenderedImage
-
getTileGridYOffset
public int getTileGridYOffset()- Specified by:
getTileGridYOffset
in interfaceRenderedImage
-
getTile
- Specified by:
getTile
in interfaceRenderedImage
-
getData
- Specified by:
getData
in interfaceRenderedImage
-
getData
- Specified by:
getData
in interfaceRenderedImage
-
copyData
- Specified by:
copyData
in interfaceRenderedImage
-
wrap
Returns the given raster as an instance ofWritableRaster
. The underlying data buffer is shared, not copied.
-