public static class RegionPainter.Image extends java.lang.Object implements RegionPainter<java.lang.Object>
RegionPainter.Alpha, RegionPainter.Image
Constructor and Description |
---|
Image() |
Modifier and Type | Method and Description |
---|---|
protected java.awt.image.BufferedImage |
createImage(int width,
int height)
This method is called if the cached image is invalidated or it's size is changed.
|
protected void |
invalidate()
This method is called to invalidate the cached image.
|
void |
paint(java.awt.Graphics2D g,
int x,
int y,
int width,
int height,
java.lang.Object object)
Renders to the given
Graphics2D object. |
protected void |
updateImage(java.awt.image.BufferedImage image)
This method is called for the cached image before
drawImage . |
protected void updateImage(java.awt.image.BufferedImage image)
drawImage
.
It should be overridden if the image must be updated without creating a new image.image
- the cached image to updateprotected java.awt.image.BufferedImage createImage(int width, int height)
width
- width of the new imageheight
- height of the new imageBufferedImage
objectprotected void invalidate()
public void paint(java.awt.Graphics2D g, int x, int y, int width, int height, java.lang.Object object)
RegionPainter
Graphics2D
object.paint
in interface RegionPainter<java.lang.Object>
g
- the Graphics2D
object to render tox
- X position of the area to painty
- Y position of the area to paintwidth
- width of the area to paintheight
- height of the area to paintobject
- an optional configuration parameter