Skip to main content

Module text_paint

Module text_paint 

Source
Expand description

What a renderer reads of a text’s style and string to draw its glyphs, worked out once per text node so that drawing a plain text never loads its style, and drawing a cached run never loads its string.

Structs§

TextPaint
The paint of a text node’s glyphs.
TextPaintCache
A text node’s TextPaint, set when the scene builds the node or when a renderer first asks for it. It is derived data, so two caches always compare equal.

Functions§

has_visible_decoration
Whether the style or a span draws an underline or a line-through.
resolve_text_color_without_gradient_fallback
The text colour a style names, its solid brush’s colour, or default, times the style’s alpha.
spans_override_foreground
Whether a span paints its range with a gradient, an alpha or a draw style of its own.
spans_override_foreground_color
Whether a span gives its range a colour or a solid brush of its own.