public abstract class DamageRegion
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) TransformContext |
_context |
Constructor and Description |
---|
DamageRegion()
FIXME: Visual Cafe barfs on this
private
|
Modifier and Type | Method and Description |
---|---|
abstract void |
apply(JCanvas canvas)
Tell the damage region to inflict itself on the given
JCanvas.
|
void |
checkCacheValid(TransformContext c)
Check transform cache validity.
|
static DamageRegion |
createDamageRegion(TransformContext c,
double x,
double y,
double w,
double h)
Create a damage region in this context over the given rectangle.
|
static DamageRegion |
createDamageRegion(TransformContext c,
java.awt.geom.Rectangle2D r)
Create a damage region in this context over the given rectangle.
|
abstract void |
extend(java.awt.geom.Rectangle2D r)
Extend the damage region with the given rectangle.
|
abstract java.awt.geom.Rectangle2D |
getBounds()
Get the bounds of this damage region.
|
TransformContext |
getContext()
Get the transform context in which this damage region was created.
|
TransformContext _context
public abstract void apply(JCanvas canvas)
canvas
- The canvaspublic void checkCacheValid(TransformContext c)
c
- The TransformContextpublic static DamageRegion createDamageRegion(TransformContext c, java.awt.geom.Rectangle2D r)
c
- The Transform Contextr
- The given rectanglepublic static DamageRegion createDamageRegion(TransformContext c, double x, double y, double w, double h)
c
- The Transform Contextx
- The x location of a corner of the damage regiony
- The y location of a corner of the damage regionw
- The width of the damage regionh
- The height of the damage regionpublic abstract void extend(java.awt.geom.Rectangle2D r)
r
- The rectangle to which to extend to.public abstract java.awt.geom.Rectangle2D getBounds()
public TransformContext getContext()