public class Tile extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Tile.Key
Used when caching tiles.
|
| Modifier and Type | Field and Description |
|---|---|
Tile.Key |
key
The key associated with this tile.
|
| Constructor and Description |
|---|
Tile() |
| Modifier and Type | Method and Description |
|---|---|
long |
getEstimatedMemoryUsage()
Returns the estimated memory usage of our underlying tile image.
|
int |
getHeight()
Returns the height of this tile.
|
int |
getWidth()
Returns the width of this tile.
|
boolean |
hitTest(int x,
int y)
Returns true if the specified coordinates within this tile contains
a non-transparent pixel.
|
void |
paint(Graphics2D gfx,
int x,
int y)
Render the tile image at the specified position in the given
graphics context.
|
void |
setImage(Mirage image)
Configures this tile with its tile image.
|
String |
toString() |
public Tile.Key key
public void setImage(Mirage image)
public int getWidth()
public int getHeight()
public long getEstimatedMemoryUsage()
public void paint(Graphics2D gfx, int x, int y)
public boolean hitTest(int x,
int y)
Copyright © 2015. All rights reserved.