gigawidgets 0.3.55
A wxWidgets-style UI library for the Arduino Giga Display Shield.
 
Loading...
Searching...
No Matches
ui::Spiral Class Reference

A spiral shape. More...

#include <spiral.hpp>

Inheritance diagram for ui::Spiral:
ui::Shape ui::Renderable

Public Member Functions

 Spiral (color_t color, float scale, coord_t innerRadius, float angleTotal, float angleStep=0.2)
 Construct the spiral.
 
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.
 

Detailed Description

A spiral shape.

Constructor & Destructor Documentation

◆ Spiral()

ui::Spiral::Spiral ( color_t  color,
float  scale,
coord_t  innerRadius,
float  angleTotal,
float  angleStep = 0.2 
)

Construct the spiral.

Parameters
colorThe spiral color.
scaleA multiplier that controls the distance between segments after each rotation.
innerRadiusThe distance from the center at which the spiral starts.
angleTotalThe number of radians that the spiral rotates around the center.
angleStepThe step size. Larger step sizes are faster to render, but make the curve less round and more angular.

Member Function Documentation

◆ getSize()

Size ui::Spiral::getSize ( ) const
overridevirtual

Get the size of the renderable.

Returns
The size of the renderable in pixels.

Implements ui::Renderable.

◆ renderAt()

void ui::Spiral::renderAt ( const Coords coords,
const shader_t shader 
) const
overridevirtual

Display the renderable directly onto the screen.

Parameters
coordsThe coordinates to render the first pixel [0,0] of the renderable.
shaderAn optional pixel shader to apply to each pixel of the renderable.

Implements ui::Renderable.


The documentation for this class was generated from the following file: