4#include "../../bounds.hpp"
7#include <initializer_list>
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 that holds the pixel space that a widget would take up on the screen.
Definition bounds.hpp:11
A struct for storing the pixel coordinates of various UI elements.
Definition coords.hpp:17
A basic 2D polygon.
Definition polygon.hpp:16
std::vector< Coords > points
The polygon vertices.
Definition polygon.hpp:22
color_t color
The color of the polygon.
Definition polygon.hpp:20
Size getSize() const override
Get the size of the renderable.
bool fill
Whether the shape is filled or just an outline.
Definition polygon.hpp:18
Polygon(color_t color, const std::initializer_list< Coords > &&points, bool fill=false)
Construct polygon from a set list of points.
Polygon(color_t color, bool fill=false)
Construct a polygon without any points.
void renderAt(const Coords &coords, const shader_t &shader) const override
Display the renderable directly onto the screen.
The common interface for rendering arbitrary shapes.
Definition shape.hpp:11
A struct that holds the number of pixels that a widget would take up on the screen.
Definition size.hpp:17