gigawidgets 0.3.55
A wxWidgets-style UI library for the Arduino Giga Display Shield.
 
Loading...
Searching...
No Matches
circle.hpp
Go to the documentation of this file.
1
2#pragma once
3
4#include "../../radius.hpp"
5#include "../shape.hpp"
6
7namespace ui {
8
12struct Circle : public Shape {
14 bool fill;
19
27
28 void renderAt(const Coords &coords, const shader_t &shader) const override;
29
30 Size getSize() const override;
31};
32
33} // namespace ui
uint16_t color_t
An RGB565 color value. 5 bits red, 6 bits green, 5 bits blue.
Definition color.hpp:13
uint16_t radius_t
A non-negative size for the pixel radius of curved shapes.
Definition radius.hpp:12
shader_animated_t shader_t
A pixel shader that may or may not update based on the current time.
Definition renderable.hpp:48
A circle.
Definition circle.hpp:12
color_t color
The color of the circle.
Definition circle.hpp:16
bool fill
Whether the shape is filled or just an outline.
Definition circle.hpp:14
void renderAt(const Coords &coords, const shader_t &shader) const override
Display the renderable directly onto the screen.
Size getSize() const override
Get the size of the renderable.
Circle(color_t color, radius_t radius, bool fill=false)
Construct a circle.
radius_t radius
The radius of the circle.
Definition circle.hpp:18
A struct for storing the pixel coordinates of various UI elements.
Definition coords.hpp:17
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