Class OGLBitmap

java.lang.Object
com.blackrook.gloop.opengl.gl1.OGLBitmap

public class OGLBitmap extends Object
Bitmap object for doing bitmap stuff. A bitmap contains a bunch of bits in a particular order in such a way that is useful somehow to the user. I guess. IT'S A BITMAP!
Author:
Matthew Tropiano
  • Method Details

    • getBit

      public boolean getBit(int x, int y)
      Gets if a bit in this bitmap is set.
      Parameters:
      x - the x-coordinate.
      y - the y-coordinate.
      Returns:
      true if set, false if not.
    • getBitIndex

      protected final int getBitIndex(int x, int y)
    • setBit

      public void setBit(int x, int y, boolean set)
      Sets a bit in this bitmap.
      Parameters:
      x - the x-coordinate.
      y - the y-coordinate.
      set - true to set, false to clear.
    • xor

      public void xor(OGLBitmap b)
      XORs this Bitmap with another, changing the contents of this one.
      Parameters:
      b - the Bitmap to XOR this with.
    • and

      public void and(OGLBitmap b)
      ANDs this Bitmap with another, changing the contents of this one.
      Parameters:
      b - the Bitmap to AND this with.
    • or

      public void or(OGLBitmap b)
      ORs this Bitmap with another, changing the contents of this one.
      Parameters:
      b - the Bitmap to OR this with.
    • not

      public void not()
      Sets this Bitmap to the One's Compliment of itself.
    • xor

      public static void xor(OGLBitmap a, OGLBitmap b, OGLBitmap out)
      XORs this Bitmap with another, changing the contents of out.
      Parameters:
      a - the first bitmap.
      b - the second bitmap.
      out - the output bitmap.
    • and

      public static void and(OGLBitmap a, OGLBitmap b, OGLBitmap out)
      ANDs this Bitmap with another, changing the contents of out.
      Parameters:
      a - the first bitmap.
      b - the second bitmap.
      out - the output bitmap.
    • or

      public static void or(OGLBitmap a, OGLBitmap b, OGLBitmap out)
      ORs this Bitmap with another, changing the contents of out.
      Parameters:
      a - the first bitmap.
      b - the second bitmap.
      out - the output bitmap.
    • not

      public static void not(OGLBitmap a, OGLBitmap out)
      NOTs this Bitmap with another, changing the contents of out.
      Parameters:
      a - the input bitmap.
      out - the output bitmap.
    • getByteLength

      public int getByteLength()
      Returns:
      the length of this Bitmap in bytes.
    • getBytes

      public byte[] getBytes()
      Returns:
      the byte representation of this Bitmap (internal byte array).
    • getWidth

      public final int getWidth()
      Returns:
      this bitmap's width.
    • getHeight

      public final int getHeight()
      Returns:
      this bitmap's height.
    • toString

      public String toString()
      Overrides:
      toString in class Object