Class Gdx2DPixmap

  • All Implemented Interfaces:
    Disposable

    public class Gdx2DPixmap
    extends java.lang.Object
    implements Disposable
    • Constructor Detail

      • Gdx2DPixmap

        public Gdx2DPixmap​(byte[] encodedData,
                           int offset,
                           int len,
                           int requestedFormat)
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • Gdx2DPixmap

        public Gdx2DPixmap​(java.nio.ByteBuffer encodedData,
                           int offset,
                           int len,
                           int requestedFormat)
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • Gdx2DPixmap

        public Gdx2DPixmap​(java.io.InputStream in,
                           int requestedFormat)
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • Gdx2DPixmap

        public Gdx2DPixmap​(java.nio.ByteBuffer pixelPtr,
                           long[] nativeData)
    • Method Detail

      • toGlFormat

        public static int toGlFormat​(int format)
      • toGlType

        public static int toGlType​(int format)
      • 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)
      • setBlend

        public void setBlend​(int blend)
      • setScale

        public void setScale​(int scale)
      • newPixmap

        public static Gdx2DPixmap newPixmap​(java.io.InputStream in,
                                            int requestedFormat)
      • newPixmap

        public static Gdx2DPixmap newPixmap​(int width,
                                            int height,
                                            int format)
      • getPixels

        public java.nio.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 java.lang.String getFormatString()
      • getFailureReason

        public static java.lang.String getFailureReason()