|
Beatmup
|
Wrapper of Android.Graphics.Bitmap object. More...
#include <bitmap.h>
Public Member Functions | |
| Bitmap (Beatmup::Context &, JNIEnv *, jobject) | |
| Creates the bitmap from Android Bitmap java object. More... | |
| ~Bitmap () | |
| const PixelFormat | getPixelFormat () const |
| Pixel format of the bitmap. More... | |
| const int | getWidth () const |
| Width of the texture in pixels. More... | |
| const int | getHeight () const |
| Height of the texture in pixels. More... | |
| const pixbyte * | getData (int x, int y) const |
| Returns a pointer to given pixel. More... | |
| pixbyte * | getData (int x, int y) |
| const msize | getMemorySize () const |
| Bitmap size in bytes. More... | |
Public Member Functions inherited from Beatmup::AbstractBitmap | |
| virtual const int | getDepth () const |
| Depth of the texture in pixels. More... | |
| virtual const TextureFormat | getTextureFormat () const |
| Returns the texture format specifying how the shader must interpret the data. More... | |
| bool | isUpToDate (ProcessingTarget) const |
| bool | isDirty () const |
Returns true if the bitmap does not contain any valid content. More... | |
| int | getPixelInt (int x, int y, int cha=0) const |
| Retrieves integer value of given channel at given pixel. More... | |
| const unsigned char | getBitsPerPixel () const |
| Returns number of bits per pixel stored in each bitmap. More... | |
| const unsigned char | getNumberOfChannels () const |
| Returns number of bytes per pixel stored in each bitmap. More... | |
| const ImageResolution | getSize () const |
| Returns the bitmap resolution within ImageResolution object. More... | |
| Context & | getContext () const |
| void | zero () |
| Sets all the pixels to zero. More... | |
| bool | isInteger () const |
Returns true if the bitmap contains integer values, false otherwise. More... | |
| bool | isFloat () const |
Returns true if the bitmap contains floating point values, false otherwise. More... | |
| bool | isMask () const |
Returns true if the bitmap is a mask, false otherwise. More... | |
| std::string | toString () const |
| Retruns a string describing the bitmap. More... | |
| void | saveBmp (const char *filename) |
| Saves the bitmap to a BMP file. More... | |
| ~AbstractBitmap () | |
Public Member Functions inherited from Beatmup::GL::TextureHandler | |
| ~TextureHandler () | |
| float | getAspectRatio () const |
| Aspect ratio of the texture. More... | |
| float | getInvAspectRatio () const |
| Inverse of the aspect ratio of the texture. More... | |
| const bool | isFloatingPoint () const |
| const int | getNumberOfChannels () const |
| Returns number of channels containing in the texture. More... | |
| bool | hasValidHandle () const |
Returns true if the texture handle points to a valid texture. More... | |
Public Member Functions inherited from Beatmup::Object | |
| virtual | ~Object () |
Private Member Functions | |
| AndroidBitmapInfo | getInfo () const |
| JNIEnv * | getEnv () const |
| void | lockPixelData () |
| Locks access to the CPU memory buffer containing pixel data. More... | |
| void | unlockPixelData () |
| Unlocks access to the CPU memory buffer containing pixel data. More... | |
Private Attributes | |
| jobject | bitmap |
| java object representing the bitmap More... | |
| JavaVM * | jvm |
| java environment More... | |
| void * | lockedPixels |
| pixel buffer; available only after calling lockPixelData() More... | |
| int | lockedWidth |
| int | lockedHeight |
| PixelFormat | lockedPixelFormat |
Additional Inherited Members | |
Public Types inherited from Beatmup::GL::TextureHandler | |
| enum | TextureFormat { Rx8 , RGBx8 , RGBAx8 , Rx32f , RGBx32f , RGBAx32f , OES_Ext } |
| Texture format, specifies how the texture should be interpreted on the shader side. More... | |
Static Public Member Functions inherited from Beatmup::AbstractBitmap | |
| static bool | isInteger (PixelFormat pixelFormat) |
Returns true if a given pixel format corresponds to integer values, false otherwise. More... | |
| static bool | isFloat (PixelFormat pixelFormat) |
Returns true if a given pixel format corresponds to floating point values, false otherwise. More... | |
| static bool | isMask (PixelFormat pixelFormat) |
Returns true if a given pixel format corresponds to a mask, false otherwise. More... | |
Static Public Member Functions inherited from Beatmup::GL::TextureHandler | |
| static const char * | textureFormatToString (const TextureFormat &) |
Static Public Attributes inherited from Beatmup::AbstractBitmap | |
| static const int | NUM_PIXEL_FORMATS = 9 |
| static const char * | PIXEL_FORMAT_NAMES [NUM_PIXEL_FORMATS] |
| pixel format names More... | |
| static const unsigned char | CHANNELS_PER_PIXEL [NUM_PIXEL_FORMATS] |
| number of channels for each pixel format More... | |
| static const unsigned char | BITS_PER_PIXEL [NUM_PIXEL_FORMATS] |
| number of bits per pixel for each pixel format More... | |
Static Public Attributes inherited from Beatmup::GL::TextureHandler | |
| static const int | TEXTURE_FORMAT_BYTES_PER_PIXEL [] |
| size of a texel in bytes for different texture formats More... | |
Protected Member Functions inherited from Beatmup::AbstractBitmap | |
| AbstractBitmap (Context &ctx) | |
| virtual void | prepare (GraphicPipeline &gpu) |
| Prepares (eventually uploads) texture data on GPU. More... | |
Protected Member Functions inherited from Beatmup::GL::TextureHandler | |
| TextureHandler () | |
| void | invalidate (RecycleBin &) |
| Forces disposing the texture data, e.g. More... | |
Protected Attributes inherited from Beatmup::AbstractBitmap | |
| Context & | ctx |
| context managing this bitmap More... | |
| bool | upToDate [2] |
| bitmap up-to-date state on CPU and GPU More... | |
Protected Attributes inherited from Beatmup::GL::TextureHandler | |
| handle_t | textureHandle |
| Beatmup::Android::Bitmap::Bitmap | ( | Beatmup::Context & | , |
| JNIEnv * | , | ||
| jobject | |||
| ) |
| Bitmap::~Bitmap | ( | ) |
Definition at line 51 of file bitmap.cpp.
|
private |
Definition at line 56 of file bitmap.cpp.
|
private |
Definition at line 28 of file bitmap.cpp.
|
privatevirtual |
Locks access to the CPU memory buffer containing pixel data.
Implements Beatmup::AbstractBitmap.
Definition at line 96 of file bitmap.cpp.
|
privatevirtual |
Unlocks access to the CPU memory buffer containing pixel data.
Implements Beatmup::AbstractBitmap.
Definition at line 107 of file bitmap.cpp.
|
virtual |
Pixel format of the bitmap.
Implements Beatmup::AbstractBitmap.
Definition at line 65 of file bitmap.cpp.
|
virtual |
Width of the texture in pixels.
Implements Beatmup::GL::TextureHandler.
Definition at line 82 of file bitmap.cpp.
|
virtual |
Height of the texture in pixels.
Implements Beatmup::GL::TextureHandler.
Definition at line 89 of file bitmap.cpp.
|
virtual |
Returns a pointer to given pixel.
| x | target pixel horizontal coordinate |
| y | target pixel vertical coordinate |
Implements Beatmup::AbstractBitmap.
Definition at line 114 of file bitmap.cpp.
|
virtual |
|
virtual |
Bitmap size in bytes.
Implements Beatmup::AbstractBitmap.
Definition at line 132 of file bitmap.cpp.
|
private |
|
private |
|
private |
pixel buffer; available only after calling lockPixelData()
|
private |