public class TextureAtlasGenerator extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TextureAtlasGenerator.Result
You'll get an instance of this class back when you add an image.
|
| Constructor and Description |
|---|
TextureAtlasGenerator(int width,
int height)
Create a new TextureAtlasGenerator
|
| Modifier and Type | Method and Description |
|---|---|
TextureAtlasGenerator.Result |
addImage(int imageWidth,
int imageHeight,
String name,
int padding)
Adds an image and calculates the target position of the image in the bigger texture as a Result instance.
|
List<TextureAtlasGenerator.Result> |
rebuild(int width,
int height,
int padding) |
TextureAtlasGenerator.Result |
removeImage(String name) |
void |
reset() |
public TextureAtlasGenerator(int width,
int height)
destination - width - height - public TextureAtlasGenerator.Result addImage(int imageWidth, int imageHeight, String name, int padding) throws TextureAtlasGeneratorException
imageWidth - image width to addimageHeight - image height to addname - name of the image this is used to track the individual images you can see this as the id of the imagepadding - padding to applyTextureAtlasGeneratorException - when the image could not be addedpublic TextureAtlasGenerator.Result removeImage(String name)
public List<TextureAtlasGenerator.Result> rebuild(int width, int height, int padding) throws TextureAtlasGeneratorException
TextureAtlasGeneratorExceptionpublic void reset()
Copyright © 2013. All Rights Reserved.