| 限定符和类型 | 类 | 说明 |
|---|---|---|
static class |
Texture.AlphaType |
Enumerates alpha types of the texture.
|
static class |
Texture.ColorType |
Enumerates pixel formats of the texture.
|
| 构造器 | 说明 |
|---|---|
Texture(int width,
int height,
Texture.ColorType colorType,
Texture.AlphaType alphaType) |
A constructor used to create a
Texture instance with the specified height, width, pixel color format, and
the way to interpret alpha. |
Texture(PixelMap pixelMap) |
A constructor used to create a
Texture instance for off-screen rendering based on the specified pixel
map. |
public Texture(int width,
int height,
Texture.ColorType colorType,
Texture.AlphaType alphaType)
Texture instance with the specified height, width, pixel color format, and
the way to interpret alpha.width - Indicates the width of the texture.height - Indicates the height of the texture.colorType - Indicates the pixel color format of the texture.alphaType - Indicates how to interpret the alpha of the texture.public Texture(PixelMap pixelMap)
Texture instance for off-screen rendering based on the specified pixel
map.pixelMap - Indicates the background image used for off-screen rendering.public PixelMap getPixelMap()
PixelMap instance with the off-screen rendering result.
All drawing operations are performed on the specified PixelMap.
PixelMap instance with the off-screen rendering result.public int getWidth()
public int getHeight()