protected static class TextureAtlas.Entry extends Object implements Comparable<TextureAtlas.Entry>
Comparable
interface by comparing
the lastUsed timestamp, ordered from least recently used to most recently used.Modifier and Type | Field and Description |
---|---|
int |
imageHeight
Indicates the element's image height.
|
int |
imageOffsetX
Indicates the element's image X offset withing the bounding rectangle.
|
int |
imageOffsetY
Indicates the element's image Y offset withing the bounding rectangle.
|
int |
imageWidth
Indicates the element's image width.
|
Object |
key
Indicates the element's key.
|
long |
lastUsed
Indicates the last time this entry was used.
|
Rect |
rect
Indicates the element's bounding rectangle within the texture atlas.
|
Constructor and Description |
---|
Entry(Object key,
Rect rect,
int imageOffsetX,
int imageOffsetY,
int imageWidth,
int imageHeight)
Constructs a texture atlas entry corresponding with a texture atlas element with the specified key, bounding
rectangle, and image offsets within the bounding rectangle.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(TextureAtlas.Entry that)
Compares this texture atlas entry's last used timestamp to that of the specified entry.
|
public int imageHeight
public int imageOffsetX
public int imageOffsetY
public int imageWidth
public final Object key
public long lastUsed
public Rect rect
public Entry(Object key, Rect rect, int imageOffsetX, int imageOffsetY, int imageWidth, int imageHeight)
key
- the element's key.rect
- the element's bounding rectangle within the texture atlas.imageOffsetX
- the element's image X offset withing the bounding rectangle.imageOffsetY
- the element's image Y offset withing the bounding rectangle.imageWidth
- the element's image width. May be smaller than the bounding rectangle's width.imageHeight
- the element's image height. May be smaller than the bounding rectangle's height.public int compareTo(TextureAtlas.Entry that)
compareTo
in interface Comparable<TextureAtlas.Entry>
that
- the texture atlas entry this entry is compared to.IllegalArgumentException
- if the specified entry is null
.