com.annahid.libs.artenus.graphics.sprites
ImageSprite.Cutout
Describes how a texture is divided into image blocks for use in an ImageSprite. By
introducing a ImageSprite.Cutout object to an ImageSprite, you instruct it
how to build its frames based on the texture you provide.
public static final class ImageSprite.Cutout
Constructor Summary
Modifier and Type | Constructor and Description |
---|---|
public | Cutout(float frameWidth, float frameHeight, int frameCount) Creates a cutout that divides the texture into blocks of the given dimensions and takes
out the given number of blocks horizontally from the texture. |
public | Cutout(float frameWidth, float frameHeight, int frameCountW, int frameCountH) Creates a cutout that divides the texture into blocks of the given dimensions. |
public | Cutout(float frameWidth, float frameHeight, int frameCountW, int frameCountH, int startX, int startY) Creates a cutout with the information given. |
Method Summary
Modifier and Type | Method and Description |
---|---|
public float | getFrameHeight() Gets the frame (block) height associated with this cutout. |
public float | getFrameWidth() Gets the frame (block) width associated with this cutout. |
Methods inherited from java.lang.Object
clone
, equals
, finalize
, getClass
, hashCode
, notify
, notifyAll
, toString
, wait
, wait
, wait
Constructor Detail
Cutout | ||||||
---|---|---|---|---|---|---|
public Cutout( float frameWidth, float frameHeight, int frameCount )Creates a cutout that divides the texture into blocks of the given dimensions and takes out the given number of blocks horizontally from the texture. The remainder of the texture will remain unused. Parameters:
|
Cutout | ||||||||
---|---|---|---|---|---|---|---|---|
public Cutout( float frameWidth, float frameHeight, int frameCountW, int frameCountH )Creates a cutout that divides the texture into blocks of the given dimensions. You can specify the number of columns and rows and it will cut out a grid of blocks from the texture with the given information. The remainder of the texture will remain unused. Parameters:
|
Cutout | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
public Cutout( float frameWidth, float frameHeight, int frameCountW, int frameCountH, int startX, int startY )Creates a cutout with the information given. This constructor is an extension to the Cutout(float, float, int, int) constructor that gives you the option to start at a given point in the texture. This can be useful if you are using large atlas textures. Parameters:
|