Expand description
Colors, brushes and corner radii resolved against the properties of a graphics layer.
Enums§
- Draw
Placement - Which half of a draw command is drawn, relative to the content of the node.
- Resolved
Brush - A layer-resolved brush, split at the solid/gradient boundary.
Functions§
- apply_
layer_ to_ brush - Resolves
brushagainstlayer: its colors take the layer’s alpha and color filter, and a gradient’s geometry takes the layer’s scale. - apply_
layer_ to_ color - The colour a primitive is actually painted in, once this layer has had its say.
- compose_
color_ filters - Combines two optional color filters into one. With only one present, that filter is returned.
- primitives_
for_ placement - Records
commandatsizeand returns the primitives thatplacementdraws, or an empty list when the command has no part for that placement. - quad_
bounds - Returns the axis-aligned bounds containing all four points.
- recording_
for_ placement_ reusing - Records
commandintostorage, a recording the caller kept from an earlier frame so its buffers keep the capacity they earned, and names the segmentsplacementdraws: everything for a behind or overlay command, the part before or after the last content marker for a with-content command.Nonewhen the command has noplacementhalf, in which case storage is not acquired and nothing is recorded. - resolve_
layer_ brush apply_layer_to_brushwithout the solid-brush clone: the borrowed brush’s color is copied (or layer-adjusted) inline, and only gradients are cloned. Produces exactly the valuesapply_layer_to_brushwould — both branches below mirror its fast path and itsSolidarm verbatim.- scale_
corner_ radii - Multiplies every corner radius by
scale.