Expand description
Render model and draw command generation module.
Structs§
- Affine
Transform - An affine transformation matrix (2D), in row-major convention with an implicit translation.
- Image
- Decoded image pixels shared between the engine and platform renderer.
- Paint
- How a path is painted: the brush plus an opacity multiplier.
- Path
- A path made of
PathCommands. - Rect
- An axis-aligned rectangle.
- Sticky
Viewport - State of the nearest scrollport, used to resolve
position: stickyoffsets. - Stroke
- Defines the geometry of a stroked line: width, cap/join style, miter limit, and optional dash pattern.
Enums§
- Brush
- A fill source: a solid color or a gradient.
- Draw
Command - A drawing instruction for the GPU renderer.
- Fill
Rule - Fill rule for path filling.
- Path
Command - A single path drawing command.
- Stroke
Cap - How the open ends of a stroked subpath are finished.
- Stroke
Join - How consecutive segments of a stroked subpath are joined.
- System
UiKind - Discriminator for
DrawCommand::SystemUi. Stub
Functions§
- clamp_
radii - Scale a set of corner radii
(rx, ry)(CSS order TL, TR, BR, BL) down proportionally so no opposing pair exceeds the box dimensions, following the CSSborder-radiusclamping rule. - ellipse_
path - Builds a closed ellipse path centered at
(cx, cy)with radiirx/ry. - generate_
draw_ commands - LayoutNode + InfoNode → DrawCommand
- is_
scrollport - Whether the node scrolls its own content and thus establishes a scrollport for its subtree. The document root always does, because the UI layer scrolls it directly without necessarily setting its scroll flags.
- line_
path - Builds a single line segment from
(x1, y1)to(x2, y2). - offset_
path - Translate every coordinate in
pathby(ox, oy). - polygon_
path - Builds a closed polygon path from the given vertex list.
- polyline_
path - Builds an open polyline path through the given vertex list.
- rect_
path - Builds a closed rectangle path with top-left corner at
(x, y). - rounded_
rect_ path - Builds a closed rounded rectangle path with top-left corner at
(x, y). - sticky_
offset - Compute the sticky translate for a box relative to its nearest scrollport.
- stroke_
path - Expands
pathinto the closed outline of its stroke: the region swept by a disk of radiusstroke.width / 2traveling along the path. - transform_
path - Apply an affine transform to every coordinate in
path.