protected static class TextureAtlas.Entry extends java.lang.Object implements java.lang.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.
|
java.lang.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(java.lang.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 java.lang.Object key
public long lastUsed
public Rect rect
public Entry(java.lang.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 java.lang.Comparable<TextureAtlas.Entry>
that
- the texture atlas entry this entry is compared to.java.lang.IllegalArgumentException
- if the specified entry is null
.