LavaUI docs GitHub

enum DrawKind

Swift

enum DrawKind

What one draw command draws. Mirrors canvas::DrawCommandKind in draw_command.hpp, which documents how each kind uses the command's fields.

Sources/LavaUI/DrawList.swift:9

Cases

case rect

Filled rectangle.

Sources/LavaUI/DrawList.swift:11

case roundedRect

Filled rectangle with rounded corners; aux is the corner radius.

Sources/LavaUI/DrawList.swift:13

case text

A run of shaped glyphs. param is the first glyph and w the glyph count.

Sources/LavaUI/DrawList.swift:15

case circle

Filled circle centred on x,y; aux is the radius.

Sources/LavaUI/DrawList.swift:17

case line

Line from x,y to w,h.

Sources/LavaUI/DrawList.swift:19

case pushClip

Starts clipping to x,y,w,h, intersected with any clip already in force.

Sources/LavaUI/DrawList.swift:21

case popClip

Ends the innermost clip.

Sources/LavaUI/DrawList.swift:23

case image

Textured quad. param is the texture id and color a tint.

Sources/LavaUI/DrawList.swift:25

case beginBackdropBlur

Flush UI so far, blur the resolve under x,y,w,h (aux = radius px).

Sources/LavaUI/DrawList.swift:27

case endBackdropBlur

Closes a blur scope (bookkeeping; engine no-ops today).

Sources/LavaUI/DrawList.swift:29

case beginContentBlur

Draw everything up to the matching End into an offscreen target instead of the frame, blur it, and composite it back over x,y,w,h with its own alpha (aux = radius px).

Sources/LavaUI/DrawList.swift:33

case endContentBlur

Closes the scope a beginContentBlur opened.

Sources/LavaUI/DrawList.swift:35

case mesh

Filled arbitrary polygon. param/w index into meshVertices (first index, count); aux 0 fans around vertex 0, 1 triangulates alternating inner/outer pairs as a ring strip.

Sources/LavaUI/DrawList.swift:39

case polyline

Connected 1px line strip. param/w index into meshVertices.

Sources/LavaUI/DrawList.swift:41

case spatialTriangles

Depth-tested 3D triangles from a Scene3D, indexing the frame's spatial vertices.

Sources/LavaUI/DrawList.swift:43

case linearGradientRect

Rounded rect filled with a two-stop linear ramp. aux = radius, param = index into the frame's gradients, color = the start colour so a consumer that ignores gradients still paints something sane.

Sources/LavaUI/DrawList.swift:47

case beginNode

Opens a scene node: param = id, x/y = local offset, w/h = viewport, color = SceneNodeFlags. See draw_command.hpp — the renderer owns state against the id, which is what a node has and a command does not.

Sources/LavaUI/DrawList.swift:51

case endNode

Closes the innermost node; x/y carry the content extent.

Sources/LavaUI/DrawList.swift:53

case nodeAnimate

Declares what the enclosing node should animate toward. See NodeAnimate in draw_command.hpp.

Sources/LavaUI/DrawList.swift:56

case nodeScrollTo

Retargets the enclosing scroll node once per request serial.

Sources/LavaUI/DrawList.swift:58

case spatialBegin

Clears depth inside one Scene3D viewport before its triangles.

Sources/LavaUI/DrawList.swift:60

case opaqueBounds

Declares x,y,w,h of this frame fully opaque. Draws nothing; lets a compositor stop blending the surface and skip what is behind it. See OpaqueBounds in draw_command.hpp.

Sources/LavaUI/DrawList.swift:64

case imageSurface

Textured quad sourced from another compositor surface. param is the surface id; aux is the longest dest edge (0 = native).

Sources/LavaUI/DrawList.swift:67

case strokedRect

Rounded rect drawn as an outline lying inside x,y,w,h. aux = the outer corner radius, param = stroke width in 24.8 fixed point. See StrokedRect in draw_command.hpp.

Sources/LavaUI/DrawList.swift:71

case glass

Glass on the next fill, image or backdrop: aux = refraction in px, param = rim strength in 1/255ths, w = an image's corner radius, h = frost, 0…1, x = magnification (0 or 1: none). See Glass in draw_command.hpp.

Sources/LavaUI/DrawList.swift:76