public interface Texture
extends org.mini2Dx.gdx.utils.Disposable
Modifier and Type | Method and Description |
---|---|
void |
draw(Pixmap pixmap,
int x,
int y)
Draws the given
Pixmap to the texture at position x, y. |
int |
getHeight()
Returns the height of the texture in pixels
|
TextureAddressMode |
getUAddressMode()
Returns the U addressing mode for this texture.
|
TextureAddressMode |
getVAddressMode()
Returns the V addressing mode for this texture.
|
int |
getWidth()
Returns the width of the texture in pixels
|
boolean |
isManaged()
Returns if this texture needs to rebind when the graphics context is lost
|
void |
setAddressMode(TextureAddressMode u,
TextureAddressMode v)
Sets the texture addressing mode for this texture
|
void |
setUAddressMode(TextureAddressMode mode)
Sets the U addressing mode for this texture.
|
void |
setVAddressMode(TextureAddressMode mode)
Sets the V addressing mode for this texture.
|
void draw(Pixmap pixmap, int x, int y)
Pixmap
to the texture at position x, y. No clipping is performed so you have to make sure that you
draw only inside the texture region. Note that this will only draw to mipmap level 0!pixmap
- The Pixmapx
- The x coordinate in pixelsy
- The y coordinate in pixelsint getWidth()
int getHeight()
boolean isManaged()
TextureAddressMode getUAddressMode()
void setUAddressMode(TextureAddressMode mode)
mode
- the new U addressing mode for this textureTextureAddressMode getVAddressMode()
void setVAddressMode(TextureAddressMode mode)
mode
- the new V addressing mode for this texturevoid setAddressMode(TextureAddressMode u, TextureAddressMode v)
u
- The new U addressing mode for this texturev
- The new V addressing mode for this texture