Class OGLBitmap
java.lang.Object
com.blackrook.gloop.opengl.gl1.OGLBitmap
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 Summary
Modifier and TypeMethodDescriptionvoidANDs this Bitmap with another, changing the contents of this one.static voidANDs this Bitmap with another, changing the contents of out.booleangetBit(int x, int y) Gets if a bit in this bitmap is set.protected final intgetBitIndex(int x, int y) intbyte[]getBytes()final intfinal intgetWidth()voidnot()Sets this Bitmap to the One's Compliment of itself.static voidNOTs this Bitmap with another, changing the contents of out.voidORs this Bitmap with another, changing the contents of this one.static voidORs this Bitmap with another, changing the contents of out.voidsetBit(int x, int y, boolean set) Sets a bit in this bitmap.toString()voidXORs this Bitmap with another, changing the contents of this one.static voidXORs this Bitmap with another, changing the contents of out.
-
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
XORs this Bitmap with another, changing the contents of this one.- Parameters:
b- the Bitmap to XOR this with.
-
and
ANDs this Bitmap with another, changing the contents of this one.- Parameters:
b- the Bitmap to AND this with.
-
or
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
-
and
-
or
-
not
-
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
-