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

A polygon specialization for regular, convex polygons. More...

#include <regular_polygon.hpp>

Inheritance diagram for ui::RegularPolygon:
ui::Polygon ui::Shape ui::Renderable

Public Member Functions

 RegularPolygon (color_t color, int points, coord_t radius, bool fill=false, float angle=0)
 Construct the polygon.
 
- Public Member Functions inherited from ui::Polygon
 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.
 
Size getSize () const override
 Get the size of the renderable.
 

Additional Inherited Members

- Public Attributes inherited from ui::Polygon
bool fill
 Whether the shape is filled or just an outline.
 
color_t color
 The color of the polygon.
 
std::vector< Coordspoints
 The polygon vertices.
 

Detailed Description

A polygon specialization for regular, convex polygons.

Constructor & Destructor Documentation

◆ RegularPolygon()

ui::RegularPolygon::RegularPolygon ( color_t  color,
int  points,
coord_t  radius,
bool  fill = false,
float  angle = 0 
)

Construct the polygon.

Parameters
colorThe color of the polygon.
pointsThe number of points in the polygon.
radiusThe distance each point is from the center.
fillWhether to fill the polygon or just draw an outline.
angleThe initial rotation of the polygon.

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