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

A polygon specialization for rectangles. More...

#include <rectangle.hpp>

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

Public Member Functions

 Rectangle (color_t color, const Coords &size)
 Construct a rectangle from a color and size.
 
- 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 rectangles.

Constructor & Destructor Documentation

◆ Rectangle()

ui::Rectangle::Rectangle ( color_t  color,
const Coords size 
)

Construct a rectangle from a color and size.

Parameters
colorThe color of the rectangle.
sizeThe size of the rectangle.

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