gigawidgets 0.3.55
A wxWidgets-style UI library for the Arduino Giga Display Shield.
 
Loading...
Searching...
No Matches
regular_polygon.hpp
Go to the documentation of this file.
1
2#pragma once
3
4#include "polygon.hpp"
5
6namespace ui {
7
11struct RegularPolygon : public Polygon {
20 RegularPolygon(color_t color, int points, coord_t radius, bool fill = false, float angle = 0);
21};
22
23} // namespace ui
uint16_t color_t
An RGB565 color value. 5 bits red, 6 bits green, 5 bits blue.
Definition color.hpp:13
int16_t coord_t
A pixel coordinate on the screen. This can be negative or otherwise off-screen.
Definition coords.hpp:12
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
bool fill
Whether the shape is filled or just an outline.
Definition polygon.hpp:18
A polygon specialization for regular, convex polygons.
Definition regular_polygon.hpp:11
RegularPolygon(color_t color, int points, coord_t radius, bool fill=false, float angle=0)
Construct the polygon.