Module gui::gui_path
GUI: 2D geometry for the vector canvas.
GuiMatrix (2x3 affine transforms), GuiRect, and GuiPath — a vector path of move/line/quadratic/cubic/close segments with the usual builders (arcs, rounded rectangles, ellipses, SVG path data). Paths are plain data in user coordinates: gui_canvas.h fills, strokes and clips with them, gui_text.h produces glyph outlines as them.
struct GuiPath p = GuiPath::new();
p.move_to(10.0f, 10.0f);
p.cubic_to(40.0f, 0.0f, 60.0f, 40.0f, 90.0f, 10.0f);
p.rounded_rect(10.0f, 50.0f, 80.0f, 30.0f, 6.0f);
canvas.fill_path(&p);
p.free();
Angles are in radians, y points down (screen coordinates), so a positive angle turns clockwise on screen — the HTML canvas convention.
Structs
| GuiPoint | |
| GuiRect | |
| GuiMatrix | x' = ax + cy + e y' = bx + dy + f |
| GuiPathSeg | |
| GuiPath |
Macros
| GUI_PATH_MOVE | GuiPathSeg.verb |
| GUI_PATH_LINE | |
| GUI_PATH_QUAD | |
| GUI_PATH_CUBIC | |
| GUI_PATH_CLOSE |