A closed outline made of straight lines and cubic Beziers, in whatever units the caller likes. More...
#include <GuiGeometry.h>
Public Types | |
| enum | CMD : uint8_t { MOVE = 'M' , LINE = 'L' , CUBIC = 'C' , CLOSE = 'Z' } |
Public Member Functions | |
| bool | empty () const |
| Checks whether the path has no commands. | |
| GuiPath & | moveTo (float x, float y) |
| GuiPath & | lineTo (float x, float y) |
| GuiPath & | cubicTo (float x1, float y1, float x2, float y2, float x, float y) |
| GuiPath & | close () |
Public Attributes | |
| std::vector< uint8_t > | cmds |
| One CMD per segment. | |
| std::vector< float > | pts |
| x, y pairs, as many as the commands consume. | |
A closed outline made of straight lines and cubic Beziers, in whatever units the caller likes.
It is how a silhouette that is not a handful of rounded rectangles is stored (the controller outlines converted from SVG are lists of these). Commands: MOVE starts a contour (1 point), LINE draws to a point (1), CUBIC draws a cubic Bezier (3: two control points, then the end), CLOSE ends the contour (0). Points are stored flat as x, y pairs.
Definition at line 81 of file GuiGeometry.h.
| enum GuiPath::CMD : uint8_t |
Definition at line 82 of file GuiGeometry.h.
|
inline |
Definition at line 96 of file GuiGeometry.h.
|
inline |
Definition at line 90 of file GuiGeometry.h.
|
inline |
Checks whether the path has no commands.
Definition at line 87 of file GuiGeometry.h.
|
inline |
Definition at line 89 of file GuiGeometry.h.
|
inline |
Definition at line 88 of file GuiGeometry.h.
| std::vector<uint8_t> GuiPath::cmds |
One CMD per segment.
Definition at line 83 of file GuiGeometry.h.
| std::vector<float> GuiPath::pts |
x, y pairs, as many as the commands consume.
Definition at line 84 of file GuiGeometry.h.