A basic image that is a single color when not transparent. More...
#include <transparency_map.hpp>
Public Member Functions | |
| TransparencyMap (const Size &size, color_t color, uint8_t *const mask) | |
| Construct a transparency map image from static data. | |
| Size | getSize () const override |
| Get the size of the transparency map. | |
| void | renderAt (const Coords &coords, const shader_t &shader=0) const override |
| Display the image directly onto the screen. | |
Public Attributes | |
| Size | size |
| The size of the image in pixels. | |
| color_t | color |
| The color of non-transparent pixels. | |
| uint8_t *const | mask |
| The transparency mask. | |
A basic image that is a single color when not transparent.
Construct a transparency map image from static data.
| size | The size of the image. |
| color | The color of non-transparent pixels. |
| mask | The transparency mask for the image. |
|
overridevirtual |
Get the size of the transparency map.
Implements ui::Renderable.
|
overridevirtual |
Display the image directly onto the screen.
| coords | The coordinages to render the first pixel [0,0] of the transparency map. |
| shader | An optional pixel shader to apply to each pixel of the transparency map. |
Implements ui::Renderable.
| uint8_t* const ui::TransparencyMap::mask |
The transparency mask.
Each bit represents its respective pixel's transparency, with 1 being fully opaque and 0 being fully transparent.