|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.media.image.NinePatchMirage
public class NinePatchMirage
Wraps a NinePatch as a Mirage of specific dimensions.
| Field Summary | |
|---|---|
protected int |
_height
|
protected NinePatch |
_ninePatch
|
protected int |
_width
|
| Constructor Summary | |
|---|---|
NinePatchMirage(BufferedImage img,
int width,
int height)
|
|
NinePatchMirage(NinePatch ninePatch,
int width,
int height)
|
|
| Method Summary | |
|---|---|
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. |
static Mirage |
newNinePatchContaining(NinePatch ninePatch,
Rectangle content)
Returns a new Mirage that's a NinePatch stretched and positioned to contain the given Rectangle. |
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 final NinePatch _ninePatch
protected final int _width
protected final int _height
| Constructor Detail |
|---|
public NinePatchMirage(BufferedImage img,
int width,
int height)
public NinePatchMirage(NinePatch ninePatch,
int width,
int height)
| Method Detail |
|---|
public static Mirage newNinePatchContaining(NinePatch ninePatch,
Rectangle content)
public long getEstimatedMemoryUsage()
Mirage
getEstimatedMemoryUsage in interface Miragepublic BufferedImage getSnapshot()
Mirage
getSnapshot 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 Mirage
public void paint(Graphics2D gfx,
int x,
int y)
Mirage
paint in interface Mirage
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||