UI module

Draw_Cmd

structextensionexperimentalsince 0.31.0Source

One display list entry.

Example↗
ui := headless();
defer free_ui(*ui);
draw_rect(*ui, .{ 5, 5, 20, 10 }, rgb(0, 255, 0), radius = 4);
cmd := ui.draw.cmds[0];
assert(cmd.rect.w == 20 && cmd.radius == 4);

Fields

kind: Draw_Kind
rect: Rect
color: Color
border_color: Color
radius: float
border: float
uv: Vector4
u0, v0, u1, v1 for a glyph

See also