Skip to content

ui::PathFigure

Header: winui/render/PathGeometry.hpp.

One figure of a geometry: a start point, its segments, whether the last point joins the first and whether the inside is painted.

Example:

ui::PathGeometry triangle;
triangle.figures.push_back(ui::PathFigure{
    .start    = ui::Point{0, 10},
    .segments = {{.p1 = ui::Point{5, 0}}, {.p1 = ui::Point{10, 10}}},
    .closed   = true,
});

Field Type Default
start Point Where the first segment begins, in DIPs.
segments std::vector<PathSegment> Each segment continues from the previous end point.
closed bool false Join the last point back to start when stroking.
filled bool true Whether the figure's inside is painted by a fill.