gigawidgets 0.3.55
A wxWidgets-style UI library for the Arduino Giga Display Shield.
 
Loading...
Searching...
No Matches
spiral.hpp
Go to the documentation of this file.
1
2#pragma once
3
4#include "../shape.hpp"
5
6namespace ui {
7
11class Spiral : public Shape {
12 color_t color;
13 float scale;
14 float innerRadius;
15 float angleTotal;
16 float angleStep;
17 Size size;
18
19public:
28 Spiral(color_t color, float scale, coord_t innerRadius, float angleTotal, float angleStep = 0.2);
29
30 void renderAt(const Coords &coords, const shader_t &shader) const override;
31
32 Size getSize() const override;
33};
34
35} // namespace ui
A spiral shape.
Definition spiral.hpp:11
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.
Spiral(color_t color, float scale, coord_t innerRadius, float angleTotal, float angleStep=0.2)
Construct the spiral.
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
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
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