Skip to main content

Module renderer_model

Module renderer_model 

Source
Expand description

Render model and draw command generation module.

Structs§

AffineTransform
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.
StickyViewport
State of the nearest scrollport, used to resolve position: sticky offsets.
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.
DrawCommand
A drawing instruction for the GPU renderer.
FillRule
Fill rule for path filling.
PathCommand
A single path drawing command.
StrokeCap
How the open ends of a stroked subpath are finished.
StrokeJoin
How consecutive segments of a stroked subpath are joined.
SystemUiKind
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 CSS border-radius clamping rule.
ellipse_path
Builds a closed ellipse path centered at (cx, cy) with radii rx/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 path by (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 path into the closed outline of its stroke: the region swept by a disk of radius stroke.width / 2 traveling along the path.
transform_path
Apply an affine transform to every coordinate in path.