com.badlogic.gdx.graphics.g2d
Class Gdx2DPixmap
java.lang.Object
com.badlogic.gdx.graphics.g2d.Gdx2DPixmap
- All Implemented Interfaces:
- Disposable
public class Gdx2DPixmap
- extends Object
- implements Disposable
- Author:
- mzechner
Method Summary |
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)
|
GDX2D_FORMAT_ALPHA
public static final int GDX2D_FORMAT_ALPHA
- See Also:
- Constant Field Values
GDX2D_FORMAT_LUMINANCE_ALPHA
public static final int GDX2D_FORMAT_LUMINANCE_ALPHA
- See Also:
- Constant Field Values
GDX2D_FORMAT_RGB888
public static final int GDX2D_FORMAT_RGB888
- See Also:
- Constant Field Values
GDX2D_FORMAT_RGBA8888
public static final int GDX2D_FORMAT_RGBA8888
- See Also:
- Constant Field Values
GDX2D_FORMAT_RGB565
public static final int GDX2D_FORMAT_RGB565
- See Also:
- Constant Field Values
GDX2D_FORMAT_RGBA4444
public static final int GDX2D_FORMAT_RGBA4444
- See Also:
- Constant Field Values
GDX2D_SCALE_NEAREST
public static final int GDX2D_SCALE_NEAREST
- See Also:
- Constant Field Values
GDX2D_SCALE_LINEAR
public static final int GDX2D_SCALE_LINEAR
- See Also:
- Constant Field Values
GDX2D_BLEND_NONE
public static final int GDX2D_BLEND_NONE
- See Also:
- Constant Field Values
GDX2D_BLEND_SRC_OVER
public static final int GDX2D_BLEND_SRC_OVER
- See Also:
- Constant Field Values
Gdx2DPixmap
public Gdx2DPixmap(byte[] encodedData,
int offset,
int len,
int requestedFormat)
throws IOException
- Throws:
IOException
Gdx2DPixmap
public Gdx2DPixmap(InputStream in,
int requestedFormat)
throws IOException
- Throws:
IOException
Gdx2DPixmap
public Gdx2DPixmap(int width,
int height,
int format)
throws GdxRuntimeException
- Throws:
GdxRuntimeException
- if allocation failed.
Gdx2DPixmap
public Gdx2DPixmap(ByteBuffer pixelPtr,
long[] nativeData)
dispose
public void dispose()
- Description copied from interface:
Disposable
- Releases all resources of this object.
- Specified by:
dispose
in interface Disposable
clear
public void clear(int color)
setPixel
public void setPixel(int x,
int y,
int color)
getPixel
public int getPixel(int x,
int y)
drawLine
public void drawLine(int x,
int y,
int x2,
int y2,
int color)
drawRect
public void drawRect(int x,
int y,
int width,
int height,
int color)
drawCircle
public void drawCircle(int x,
int y,
int radius,
int color)
fillRect
public void fillRect(int x,
int y,
int width,
int height,
int color)
fillCircle
public void fillCircle(int x,
int y,
int radius,
int color)
fillTriangle
public void fillTriangle(int x1,
int y1,
int x2,
int y2,
int x3,
int y3,
int color)
drawPixmap
public void drawPixmap(Gdx2DPixmap src,
int srcX,
int srcY,
int dstX,
int dstY,
int width,
int height)
drawPixmap
public void drawPixmap(Gdx2DPixmap src,
int srcX,
int srcY,
int srcWidth,
int srcHeight,
int dstX,
int dstY,
int dstWidth,
int dstHeight)
newPixmap
public static Gdx2DPixmap newPixmap(InputStream in,
int requestedFormat)
newPixmap
public static Gdx2DPixmap newPixmap(int width,
int height,
int format)
getPixels
public ByteBuffer getPixels()
getHeight
public int getHeight()
getWidth
public int getWidth()
getFormat
public int getFormat()
getGLInternalFormat
public int getGLInternalFormat()
getGLFormat
public int getGLFormat()
getGLType
public int getGLType()
getFormatString
public String getFormatString()
setBlend
public static void setBlend(int blend)
setScale
public static void setScale(int scale)
getFailureReason
public static String getFailureReason()
Copyright © 2014. All Rights Reserved.