gigawidgets 0.3.55
A wxWidgets-style UI library for the Arduino Giga Display Shield.
 
Loading...
Searching...
No Matches
transparency_map.hpp
Go to the documentation of this file.
1
2#pragma once
3
4#include "../../renderable.hpp"
5
6namespace ui {
7
11struct TransparencyMap : public Renderable {
14
17
23 uint8_t *const mask;
24
31 TransparencyMap(const Size &size, color_t color, uint8_t *const mask);
32
37 Size getSize() const override;
38
45 void renderAt(const Coords &coords, const shader_t &shader = 0) const override;
46};
47
48} // namespace ui
uint16_t color_t
An RGB565 color value. 5 bits red, 6 bits green, 5 bits blue.
Definition color.hpp:13
shader_animated_t shader_t
A pixel shader that may or may not update based on the current time.
Definition renderable.hpp:48
A struct for storing the pixel coordinates of various UI elements.
Definition coords.hpp:17
An abstract interface for arbitrary renderable objects.
Definition renderable.hpp:55
A struct that holds the number of pixels that a widget would take up on the screen.
Definition size.hpp:17
A basic image that is a single color when not transparent.
Definition transparency_map.hpp:11
uint8_t *const mask
The transparency mask.
Definition transparency_map.hpp:23
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.
TransparencyMap(const Size &size, color_t color, uint8_t *const mask)
Construct a transparency map image from static data.
Size size
The size of the image in pixels.
Definition transparency_map.hpp:13
color_t color
The color of non-transparent pixels.
Definition transparency_map.hpp:16