Skip to main content

Module flex_text

Module flex_text 

Source
Expand description

FlexText — late-pass textured-quad scene node.

Structurally identical to Sprite: a textured quad with anchor + tint sampled from its container’s transform. The difference is when the renderer paints it.

Wisp’s render-bucket order is sprite → graphics → text. Charts emit their bars / gridlines / axis lines as Graphics primitives, so anything in the sprite pass renders under them. That’s correct for background imagery but wrong for axis tick labels, legends, KPI big numbers — any text that has to read on top of the chart.

FlexText participates in a fourth render pass that runs after Text (the bitmap-font pipeline), using the same instanced textured-quad shader as Sprite. The intended producer is the flexible-text path: rasterise via crate::text::TextTexturePipeline::render, call crate::texture::render_texture::RenderTexture::as_texture, drop the resulting crate::texture::Texture into a FlexText.

FlexText is purposefully not auto-named “Label” or “Overlay” — call it what it is. Charts can compose it for axis labels, callers can compose it for any “render this textured quad on top of graphics” use case.

Structs§

FlexText
Late-pass textured quad. Same data shape as Sprite; the render pipeline puts it in the fourth render pass so it paints after every Graphics primitive.