| Constructor and Description |
|---|
NinePatchMirage(BufferedImage img,
int width,
int height) |
NinePatchMirage(NinePatch ninePatch,
int width,
int height) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public NinePatchMirage(BufferedImage img, int width, int height)
public NinePatchMirage(NinePatch ninePatch, int width, int height)
public static Mirage newNinePatchContaining(NinePatch ninePatch, Rectangle content)
public long getEstimatedMemoryUsage()
MiragegetEstimatedMemoryUsage in interface Miragepublic BufferedImage getSnapshot()
MiragegetSnapshot in interface Miragepublic int getWidth()
Miragepublic int getHeight()
Miragepublic boolean hitTest(int x,
int y)
Miragepublic void paint(Graphics2D gfx, int x, int y)
MirageCopyright © 2015. All rights reserved.