DVUI

Builder

A builder with an ArrayList to add points to.

If a OutOfMemory error occurs, the builder with log it and ignore it, meaning that you would get an incomplete path in that case. For rendering, this will produce an incorrect output but will largely tend to work.

Builder.deinit should always be called as Builder.build does not give ownership of the memory

Fields

#
points:std.array_list.Managed(Point.Physical)
std.array_list.Managed(Point.Physical)
oom_error_occurred:bool
bool

Functions

#
build

Returns a non-owned Path. Calling deinit on the Builder is still required to free memory

addPoint

Add a point to the path

addRect

Add rect to path with corners. Starts from top left, and ends at top

addCorner

DO NOT USE this function as a user which you should always use addRect,

addArc

Add line segments creating an arc to path.