public class Gdx2DPixmap extends Object implements Disposable
Modifier and Type | Field and Description |
---|---|
static int |
GDX2D_BLEND_NONE |
static int |
GDX2D_BLEND_SRC_OVER |
static int |
GDX2D_FORMAT_ALPHA |
static int |
GDX2D_FORMAT_LUMINANCE_ALPHA |
static int |
GDX2D_FORMAT_RGB565 |
static int |
GDX2D_FORMAT_RGB888 |
static int |
GDX2D_FORMAT_RGBA4444 |
static int |
GDX2D_FORMAT_RGBA8888 |
static int |
GDX2D_SCALE_LINEAR |
static int |
GDX2D_SCALE_NEAREST |
Constructor and Description |
---|
Gdx2DPixmap(byte[] encodedData,
int offset,
int len,
int requestedFormat) |
Gdx2DPixmap(ByteBuffer pixelPtr,
long[] nativeData) |
Gdx2DPixmap(InputStream in,
int requestedFormat) |
Gdx2DPixmap(int width,
int height,
int format) |
Modifier and Type | Method and Description |
---|---|
void |
clear(int color) |
void |
dispose()
Releases all resources of this object.
|
void |
drawCircle(int x,
int y,
int radius,
int color) |
void |
drawLine(int x,
int y,
int x2,
int y2,
int color) |
void |
drawPixmap(Gdx2DPixmap src,
int srcX,
int srcY,
int dstX,
int dstY,
int width,
int height) |
void |
drawPixmap(Gdx2DPixmap src,
int srcX,
int srcY,
int srcWidth,
int srcHeight,
int dstX,
int dstY,
int dstWidth,
int dstHeight) |
void |
drawRect(int x,
int y,
int width,
int height,
int color) |
void |
fillCircle(int x,
int y,
int radius,
int color) |
void |
fillRect(int x,
int y,
int width,
int height,
int color) |
void |
fillTriangle(int x1,
int y1,
int x2,
int y2,
int x3,
int y3,
int color) |
static String |
getFailureReason() |
int |
getFormat() |
String |
getFormatString() |
int |
getGLFormat() |
int |
getGLInternalFormat() |
int |
getGLType() |
int |
getHeight() |
int |
getPixel(int x,
int y) |
ByteBuffer |
getPixels() |
int |
getWidth() |
static Gdx2DPixmap |
newPixmap(InputStream in,
int requestedFormat) |
static Gdx2DPixmap |
newPixmap(int width,
int height,
int format) |
static void |
setBlend(int blend) |
void |
setPixel(int x,
int y,
int color) |
static void |
setScale(int scale) |
public static final int GDX2D_FORMAT_ALPHA
public static final int GDX2D_FORMAT_LUMINANCE_ALPHA
public static final int GDX2D_FORMAT_RGB888
public static final int GDX2D_FORMAT_RGBA8888
public static final int GDX2D_FORMAT_RGB565
public static final int GDX2D_FORMAT_RGBA4444
public static final int GDX2D_SCALE_NEAREST
public static final int GDX2D_SCALE_LINEAR
public static final int GDX2D_BLEND_NONE
public static final int GDX2D_BLEND_SRC_OVER
public Gdx2DPixmap(byte[] encodedData, int offset, int len, int requestedFormat) throws IOException
IOException
public Gdx2DPixmap(InputStream in, int requestedFormat) throws IOException
IOException
public Gdx2DPixmap(int width, int height, int format) throws GdxRuntimeException
GdxRuntimeException
- if allocation failed.public Gdx2DPixmap(ByteBuffer pixelPtr, long[] nativeData)
public void dispose()
Disposable
dispose
in interface Disposable
public void clear(int color)
public void setPixel(int x, int y, int color)
public int getPixel(int x, int y)
public void drawLine(int x, int y, int x2, int y2, int color)
public void drawRect(int x, int y, int width, int height, int color)
public void drawCircle(int x, int y, int radius, int color)
public void fillRect(int x, int y, int width, int height, int color)
public void fillCircle(int x, int y, int radius, int color)
public void fillTriangle(int x1, int y1, int x2, int y2, int x3, int y3, int color)
public void drawPixmap(Gdx2DPixmap src, int srcX, int srcY, int dstX, int dstY, int width, int height)
public void drawPixmap(Gdx2DPixmap src, int srcX, int srcY, int srcWidth, int srcHeight, int dstX, int dstY, int dstWidth, int dstHeight)
public static Gdx2DPixmap newPixmap(InputStream in, int requestedFormat)
public static Gdx2DPixmap newPixmap(int width, int height, int format)
public ByteBuffer getPixels()
public int getHeight()
public int getWidth()
public int getFormat()
public int getGLInternalFormat()
public int getGLFormat()
public int getGLType()
public String getFormatString()
public static void setBlend(int blend)
public static void setScale(int scale)
public static String getFailureReason()
Copyright © 2015. All rights reserved.