A basic image with no compression, and with 1 bit of transparency per pixel. More...
#include <transparent_bitmap.hpp>
Public Member Functions | |
| TransparentBitmap (const Size &size, color_t *const data, uint8_t *const mask) | |
| Construct a transparent bitmap image from static data. | |
| void | renderAt (const Coords &coords, const shader_t &shader=0) const override |
| Display the bitmap directly onto the screen. | |
| color_t | averageColor () const override |
| Get the average color of the bitmap. | |
Public Member Functions inherited from ui::Bitmap | |
| Bitmap (const Size &size, color_t *const data) | |
| Construct a bitmap image from static data. | |
| Size | getSize () const override |
| Get the size of the bitmap. | |
Public Attributes | |
| uint8_t *const | mask |
| The transparency mask. | |
Public Attributes inherited from ui::Bitmap | |
| Size | size |
| The size of the image in pixels. | |
| color_t *const | data |
| The list of pixels in the image. | |
A basic image with no compression, and with 1 bit of transparency per pixel.
| ui::TransparentBitmap::TransparentBitmap | ( | const Size & | size, |
| color_t *const | data, | ||
| uint8_t *const | mask | ||
| ) |
Construct a transparent bitmap image from static data.
| size | The size of the image. |
| data | The list of pixels in the image. |
| mask | The transparency mask for the image. |
|
overridevirtual |
Get the average color of the bitmap.
Reimplemented from ui::Bitmap.
|
overridevirtual |
Display the bitmap directly onto the screen.
| coords | The coordinages to render the first pixel [0,0] of the bitmap. |
| shader | An optional pixel shader to apply to each pixel of the bitmap. |
Reimplemented from ui::Bitmap.
| uint8_t* const ui::TransparentBitmap::mask |
The transparency mask.
Each bit represents its respective pixel's transparency, with 1 being fully opaque and 0 being fully transparent.