midio_ui/gui/drawing_primitives

Procs

proc createTextPrimitive(elem: Element; text: string; pos: Point = vec2(0.0, 0.0);
                        color: string = "white"; fontSize: float = 12.0;
                        font: string = "system-ui"; textBaseline: string = "top";
                        alignment: string = "left"): Primitive {...}{.
    raises: [UnpackError], tags: [].}
proc moveTo(x: float; y: float): PathSegment {...}{.raises: [], tags: [].}
proc lineTo(x: float; y: float): PathSegment {...}{.raises: [], tags: [].}
proc curveTo(cpx: float; cpy: float; x: float; y: float): PathSegment {...}{.raises: [], tags: [].}
proc close(): PathSegment {...}{.raises: [], tags: [].}
proc createPath(self: Element; colorInfo: Option[ColorInfo];
               strokeInfo: Option[StrokeInfo]; segments: seq[PathSegment]): Primitive {...}{.
    raises: [UnpackError], tags: [].}
proc createPath(self: Element; colorInfo: Option[ColorInfo];
               strokeInfo: Option[StrokeInfo]; segments: varargs[PathSegment]): Primitive {...}{.
    raises: [UnpackError], tags: [].}
proc circle(self: Element; colorInfo: Option[ColorInfo];
           strokeInfo: Option[StrokeInfo]; center: Point; radius: float): Primitive {...}{.
    raises: [UnpackError], tags: [].}
proc ellipse(self: Element; colorInfo: Option[ColorInfo];
            strokeInfo: Option[StrokeInfo]; center: Point; radius: Vec2[float]): Primitive {...}{.
    raises: [UnpackError], tags: [].}
proc rectangle(self: Element; colorInfo: Option[ColorInfo];
              strokeInfo: Option[StrokeInfo]): Primitive {...}{.raises: [UnpackError],
    tags: [].}
proc rectangle(bounds: Bounds; colorInfo: Option[ColorInfo];
              strokeInfo: Option[StrokeInfo]): Primitive {...}{.raises: [], tags: [].}
proc fillColor(color: Color): ColorInfo {...}{.raises: [], tags: [].}