|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.media.image.TransformedMirage
public class TransformedMirage
Draws a mirage combined with an arbitrary AffineTransform.
| Field Summary | |
|---|---|
protected Mirage |
_base
The base mirage. |
protected Rectangle |
_bounds
Our transformed bounds. |
protected AffineTransform |
_transform
The transform we apply when painting the base mirage. |
| Constructor Summary | |
|---|---|
TransformedMirage(Mirage base,
AffineTransform transform)
Constructor for backwards compatibility that automatically repositions the transformed mirage so its new upper-left corner is still at the origin. |
|
TransformedMirage(Mirage base,
AffineTransform transform,
boolean reposition)
Constructor. |
|
| Method Summary | |
|---|---|
protected void |
computeTransformedBounds()
Compute the bounds of the base Mirage after it has been transformed. |
long |
getEstimatedMemoryUsage()
Returns an estimate of the memory consumed by this mirage's image raster data. |
int |
getHeight()
Returns the height of this mirage. |
BufferedImage |
getSnapshot()
Returns a snapshot of this mirage as a buffered image. |
int |
getWidth()
Returns the width of this mirage. |
boolean |
hitTest(int x,
int y)
Returns true if this mirage contains a non-transparent pixel at the specified coordinate. |
void |
paint(Graphics2D gfx,
int x,
int y)
Renders this mirage at the specified position in the supplied graphics context. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Mirage _base
protected Rectangle _bounds
protected AffineTransform _transform
| Constructor Detail |
|---|
public TransformedMirage(Mirage base,
AffineTransform transform)
public TransformedMirage(Mirage base,
AffineTransform transform,
boolean reposition)
| Method Detail |
|---|
public void paint(Graphics2D gfx,
int x,
int y)
Mirage
paint in interface Miragepublic int getWidth()
Mirage
getWidth in interface Miragepublic int getHeight()
Mirage
getHeight in interface Mirage
public boolean hitTest(int x,
int y)
Mirage
hitTest in interface Miragepublic BufferedImage getSnapshot()
Mirage
getSnapshot in interface Miragepublic long getEstimatedMemoryUsage()
Mirage
getEstimatedMemoryUsage in interface Mirageprotected void computeTransformedBounds()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||