diva.util.java2d
Class PaintedImage
java.lang.Object
diva.util.java2d.PaintedImage
- All Implemented Interfaces:
- PaintedObject, java.awt.image.ImageObserver
public class PaintedImage
- extends java.lang.Object
- implements PaintedObject, java.awt.image.ImageObserver
- Version:
- $Id: PaintedImage.java 39592 2005-10-24 19:09:12Z cxh $
- Author:
- Steve Neuendorffer
Field Summary |
private java.awt.geom.Rectangle2D |
_bounds
|
private java.awt.Image |
_image
|
private java.awt.geom.AffineTransform |
_transform
|
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary |
PaintedImage(java.awt.Image image,
java.awt.geom.Rectangle2D bounds)
|
Method Summary |
java.awt.geom.Rectangle2D |
getBounds()
Get the bounding box of the object when painted. |
boolean |
imageUpdate(java.awt.Image image,
int flags,
int x,
int y,
int w,
int h)
|
void |
paint(java.awt.Graphics2D g)
Paint the shape. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_image
private java.awt.Image _image
_transform
private java.awt.geom.AffineTransform _transform
_bounds
private java.awt.geom.Rectangle2D _bounds
PaintedImage
public PaintedImage(java.awt.Image image,
java.awt.geom.Rectangle2D bounds)
getBounds
public java.awt.geom.Rectangle2D getBounds()
- Get the bounding box of the object when painted.
- Specified by:
getBounds
in interface PaintedObject
paint
public void paint(java.awt.Graphics2D g)
- Paint the shape. Implementations are expected to redraw
the entire object. Whether or not the paint overwrites
fields in the graphics context such as the current
paint, stroke, and composite, depends on the implementing class.
- Specified by:
paint
in interface PaintedObject
imageUpdate
public boolean imageUpdate(java.awt.Image image,
int flags,
int x,
int y,
int w,
int h)
- Specified by:
imageUpdate
in interface java.awt.image.ImageObserver