| Modifier and Type | Field and Description |
|---|---|
| private byte[] | bitmap
8 pixels per byte, 0 for white, 1 for black |
| private final int | height
The height of the bitmap in pixels. |
| private final int | rowStride
The amount of bytes used per row. |
| private final int | width
The width of the bitmap in pixels. |
| Access | Constructor and Description |
|---|---|
| public | Bitmap(int
- The real width of the bitmap in pixels. width, int - The real height of the bitmap in pixels. height)Creates an instance of a blank image. |
| Modifier and Type | Method and Description |
|---|---|
| public static void | |
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. Indicates whether some other object is "equal to" this one. |
| public void | fillBitmap(byte
the value to be stored in all elements of the bitmap fillByte)Fill the underlying bitmap with the given byte value. |
| public int | Returns: The bit offset of a pixel in its byte.- The x coordinate of a pixel. x)Computes the offset of the given x coordinate in its byte. |
| public Rectangle | |
| public byte | Returns: The byte at theindex-position.- The array index that specifies the position of the wanted byte. index)Simply returns a byte from the bitmap byte array. |
| public byte[] | Returns: The byte array of this bitmap.
Deprecated
don't expose the underlying byte array, will be removed in a future release.
Simply returns the byte array of this bitmap. |
| public int | Returns: The converted byte at theindex-position as an integer.- The array index that specifies the position of the wanted byte. index)Converts the byte at specified index into an integer and returns the value. |
| public int | Returns: The index of the byte that contains the specified pixel.- The pixel's x coordinate. x, int - The pixel's y coordinate. y)Returns the index of the byte that contains the pixel, specified by the pixel's x and y coordinates. |
| public int | |
| public int | |
| public int | Returns: byte array length
Deprecated
renamed, will be removed in a future release. Use
Bitmap#getLength() instead.
Returns the length of the underlying byte array. |
| public byte | Returns: The value of a pixel.- The x coordinate of the pixel. x, int - The y coordinate of the pixel. y)Returns the value of a pixel specified by the given coordinates. |
| public int | |
| public int | |
| public void | setByte(int
- The array index that specifies the position of a byte. index, byte - The byte that should be set. value)Simply sets the given value at the given array index position. |
| public void |
| bitmap | back to summary |
|---|---|
| private byte[] bitmap 8 pixels per byte, 0 for white, 1 for black | |
| height | back to summary |
|---|---|
| private final int height The height of the bitmap in pixels. | |
| rowStride | back to summary |
|---|---|
| private final int rowStride The amount of bytes used per row. | |
| width | back to summary |
|---|---|
| private final int width The width of the bitmap in pixels. | |
| Bitmap | back to summary |
|---|---|
| public Bitmap(int width, int height) Creates an instance of a blank image.
| |
| arraycopy | back to summary |
|---|---|
| public static void arraycopy(Bitmap src, int srcPos, Bitmap dest, int destPos, int length) Copy parts of the underlying array of a Bitmap to another Bitmap. | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| fillBitmap | back to summary |
|---|---|
| public void fillBitmap(byte fillByte) Fill the underlying bitmap with the given byte value.
| |
| getBitOffset | back to summary |
|---|---|
| public int getBitOffset(int x) Computes the offset of the given x coordinate in its byte. The method uses optimized modulo operation for a better performance.
| |
| getBounds | back to summary |
|---|---|
| public Rectangle getBounds() | |
| getByte | back to summary |
|---|---|
| public byte getByte(int index) Simply returns a byte from the bitmap byte array. Throws an
| |
| getByteArray | back to summary |
|---|---|
| public byte[] getByteArray()
Deprecated don't expose the underlying byte array, will be removed in a future release. Simply returns the byte array of this bitmap.
| |
| getByteAsInteger | back to summary |
|---|---|
| public int getByteAsInteger(int index) Converts the byte at specified index into an integer and returns the value. Throws an
| |
| getByteIndex | back to summary |
|---|---|
| public int getByteIndex(int x, int y) Returns the index of the byte that contains the pixel, specified by the pixel's x and y coordinates.
| |
| getHeight | back to summary |
|---|---|
| public int getHeight() Simply returns the height of this bitmap.
| |
| getLength | back to summary |
|---|---|
| public int getLength() Returns the length of the underlying byte array.
| |
| getMemorySize | back to summary |
|---|---|
| public int getMemorySize()
Deprecated renamed, will be removed in a future release. Use Returns the length of the underlying byte array.
| |
| getPixel | back to summary |
|---|---|
| public byte getPixel(int x, int y) Returns the value of a pixel specified by the given coordinates.
By default, the value is
| |
| getRowStride | back to summary |
|---|---|
| public int getRowStride() Simply returns the row stride of this bitmap.
| |
| getWidth | back to summary |
|---|---|
| public int getWidth() Simply returns the width of this bitmap.
| |
| setByte | back to summary |
|---|---|
| public void setByte(int index, byte value) Simply sets the given value at the given array index position. Throws an
| |
| setPixel | back to summary |
|---|---|
| public void setPixel(int x, int y, byte pixelValue) | |