A polygon specialization for regular, convex polygons. More...
#include <regular_polygon.hpp>
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< Coords > | points |
| The polygon vertices. | |
A polygon specialization for regular, convex polygons.
| ui::RegularPolygon::RegularPolygon | ( | color_t | color, |
| int | points, | ||
| coord_t | radius, | ||
| bool | fill = false, |
||
| float | angle = 0 |
||
| ) |
Construct the polygon.
| color | The color of the polygon. |
| points | The number of points in the polygon. |
| radius | The distance each point is from the center. |
| fill | Whether to fill the polygon or just draw an outline. |
| angle | The initial rotation of the polygon. |