Contain and manage a RGB or RGBA 32bit bitmap image.
More...
#include <bitmap.h>
|
| LeBitmap () |
|
| ~LeBitmap () |
|
void | clear (LeColor color) |
| Clear the image with the specified color. More...
|
|
void | rect (int32_t x, int32_t y, int32_t w, int32_t h, LeColor color) |
| Fill a rectangle with the specified color. More...
|
|
void | blit (int32_t xDst, int32_t yDst, const LeBitmap *src, int32_t xSrc, int32_t ySrc, int32_t w, int32_t h) |
| Copy an image portion to the image. More...
|
|
void | alphaBlit (int32_t xDst, int32_t yDst, const LeBitmap *src, int32_t xSrc, int32_t ySrc, int32_t w, int32_t h) |
| Copy an image portion to the image (premultiplied alpha format) More...
|
|
void | alphaScaleBlit (int32_t xDst, int32_t yDst, int32_t wDst, int32_t hDst, const LeBitmap *src, int32_t xSrc, int32_t ySrc, int32_t wSrc, int32_t hSrc) |
| Copy and scale an image portion to the image (premultiplied alpha format) More...
|
|
void | text (int x, int y, const char *text, int length, const LeBmpFont *font) |
| Write a short text with the specified bitmap character set. More...
|
|
void | allocate (int tx, int ty) |
| Allocate bitmap memory. More...
|
|
void | deallocate () |
| Deallocate bitmap memory. More...
|
|
void | preMultiply () |
| Alpha pre-multiply an RGBA bitmap. More...
|
|
void | makeMipmaps () |
| Generate mipmaps from the bitmap. More...
|
|
Contain and manage a RGB or RGBA 32bit bitmap image.
void LeBitmap::allocate |
( |
int |
tx, |
|
|
int |
ty |
|
) |
| |
Allocate bitmap memory.
- Parameters
-
[in] | tx | image width (pixels) |
[in] | ty | image height (pixels) |
void LeBitmap::alphaBlit |
( |
int32_t |
xDst, |
|
|
int32_t |
yDst, |
|
|
const LeBitmap * |
src, |
|
|
int32_t |
xSrc, |
|
|
int32_t |
ySrc, |
|
|
int32_t |
w, |
|
|
int32_t |
h |
|
) |
| |
Copy an image portion to the image (premultiplied alpha format)
- Parameters
-
[in] | xDst | horizontal destination position (pixels) |
[in] | yDst | vertical destination position (pixels) |
[in] | src | source bitmap image |
[in] | xSrc | horizontal source position (pixels) |
[in] | ySrc | vertical source position (pixels) |
[in] | w | portion width (pixels) |
[in] | h | portion height (pixels) |
void LeBitmap::alphaScaleBlit |
( |
int32_t |
xDst, |
|
|
int32_t |
yDst, |
|
|
int32_t |
wDst, |
|
|
int32_t |
hDst, |
|
|
const LeBitmap * |
src, |
|
|
int32_t |
xSrc, |
|
|
int32_t |
ySrc, |
|
|
int32_t |
wSrc, |
|
|
int32_t |
hSrc |
|
) |
| |
Copy and scale an image portion to the image (premultiplied alpha format)
- Parameters
-
[in] | xDst | horizontal destination position (pixels) |
[in] | yDst | vertical destination position (pixels) |
[in] | wDst | destination width (pixels) |
[in] | hDst | destination height (pixels) |
[in] | src | source bitmap image |
[in] | xSrc | horizontal source position (pixels) |
[in] | ySrc | vertical source position (pixels) |
[in] | wSrc | source width (pixels) |
[in] | hSrc | source height (pixels) |
void LeBitmap::blit |
( |
int32_t |
xDst, |
|
|
int32_t |
yDst, |
|
|
const LeBitmap * |
src, |
|
|
int32_t |
xSrc, |
|
|
int32_t |
ySrc, |
|
|
int32_t |
w, |
|
|
int32_t |
h |
|
) |
| |
Copy an image portion to the image.
- Parameters
-
[in] | xDst | horizontal destination position (pixels) |
[in] | yDst | vertical destination position (pixels) |
[in] | src | source bitmap image |
[in] | xSrc | horizontal source position (pixels) |
[in] | ySrc | vertical source position (pixels) |
[in] | w | portion width (pixels) |
[in] | h | portion height (pixels) |
void LeBitmap::clear |
( |
LeColor |
color | ) |
|
Clear the image with the specified color.
- Parameters
-
[in] | color | RGBA 32bit color |
void LeBitmap::deallocate |
( |
| ) |
|
Deallocate bitmap memory.
void LeBitmap::makeMipmaps |
( |
| ) |
|
Generate mipmaps from the bitmap.
void LeBitmap::preMultiply |
( |
| ) |
|
Alpha pre-multiply an RGBA bitmap.
void LeBitmap::rect |
( |
int32_t |
x, |
|
|
int32_t |
y, |
|
|
int32_t |
w, |
|
|
int32_t |
h, |
|
|
LeColor |
color |
|
) |
| |
Fill a rectangle with the specified color.
- Parameters
-
[in] | x | horizontal position of the rectangle (pixels) |
[in] | y | vertical position of the rectangle (pixels) |
[in] | w | width of the rectangle (pixels) |
[in] | h | height of the rectangle (pixels) |
[in] | color | RGBA 32bit color |
void LeBitmap::text |
( |
int |
x, |
|
|
int |
y, |
|
|
const char * |
text, |
|
|
int |
length, |
|
|
const LeBmpFont * |
font |
|
) |
| |
Write a short text with the specified bitmap character set.
- Parameters
-
[in] | x | horizontal text position (pixels) |
[in] | y | vertical text position (pixels) |
[in] | text | ascii string |
[in] | length | string length |
[in] | font | monospace bitmap character set |
Handle available for bitmap
Handle available for graphic contexts
bool LeBitmap::dataAllocated |
Image format and attributes
Table of mipmaps (bitmap pointers)
Horizontal size of image in pixels
Horizontal size (power of 2)
Vertical size of image in pixels
Vertical size (power of 2)
The documentation for this class was generated from the following files: