public class Atlas
extends com.badlogic.gdx.graphics.g2d.TextureAtlas
| Constructor and Description |
|---|
Atlas(com.badlogic.gdx.files.FileHandle file) |
| Modifier and Type | Method and Description |
|---|---|
com.badlogic.gdx.graphics.g2d.TextureAtlas.AtlasRegion |
addRegion(java.lang.String name,
com.badlogic.gdx.graphics.Texture texture,
int x,
int y,
int width,
int height) |
void |
dispose() |
com.badlogic.gdx.graphics.g2d.TextureAtlas.AtlasRegion |
findRegion(java.lang.String name)
Note that this returns the 'error' region if this region is not found.
|
com.badlogic.gdx.graphics.Pixmap |
getPixmapOf(java.lang.String name) |
com.badlogic.gdx.graphics.Pixmap |
getPixmapOf(com.badlogic.gdx.graphics.g2d.TextureRegion region)
Used for getting the pixmap of a certain region.
|
boolean |
hasRegion(java.lang.String s) |
float |
regionHeight(java.lang.String name) |
float |
regionWidth(java.lang.String name) |
void |
setErrorRegion(com.badlogic.gdx.graphics.g2d.TextureAtlas.AtlasRegion region)
Sets the error region to the specified region.
|
public com.badlogic.gdx.graphics.Pixmap getPixmapOf(java.lang.String name)
public com.badlogic.gdx.graphics.Pixmap getPixmapOf(com.badlogic.gdx.graphics.g2d.TextureRegion region)
region - the region to use.public com.badlogic.gdx.graphics.g2d.TextureAtlas.AtlasRegion addRegion(java.lang.String name,
com.badlogic.gdx.graphics.Texture texture,
int x,
int y,
int width,
int height)
addRegion in class com.badlogic.gdx.graphics.g2d.TextureAtlaspublic void setErrorRegion(com.badlogic.gdx.graphics.g2d.TextureAtlas.AtlasRegion region)
public com.badlogic.gdx.graphics.g2d.TextureAtlas.AtlasRegion findRegion(java.lang.String name)
findRegion in class com.badlogic.gdx.graphics.g2d.TextureAtlaspublic float regionHeight(java.lang.String name)
public float regionWidth(java.lang.String name)
public boolean hasRegion(java.lang.String s)
public void dispose()
dispose in interface com.badlogic.gdx.utils.Disposabledispose in class com.badlogic.gdx.graphics.g2d.TextureAtlas