Skip to main content

Module default_drawables

Module default_drawables 

Source
Expand description

crate::drawable::WgpuDrawable implementations for standard cotis-defaults render commands.

These impls connect layout pipe output to the wgpu geometry batch and glyphon text system.

§Supported commands

CommandBehavior
cotis_defaults::render_commands::RectangleFilled rounded rectangle
cotis_defaults::render_commands::BorderRounded border outline
cotis_defaults::render_commands::TextGlyphon text at bounding box origin
cotis_defaults::render_commands::ImagePlaceholder: filled rectangle using background color (no texture)
cotis_defaults::render_commands::ClipStart / cotis_defaults::render_commands::ClipEndText scissor region (not geometry shader clipping)
cotis_defaults::render_commands::render_t_list::RenderTListRecursive list traversal

§complex-color feature

When enabled, color fields become ColorLayer instead of plain cotis_defaults::colors::Color. Non-solid layers are collapsed to a single color:

  • Solid — used as-is.
  • Linear, Radial, RoundedRect — resolve to transparent black (gradients are not rendered).
  • Layered — only the first sub-layer is used, recursively.

Enable with cotis-wgpu feature complex-color or in Cargo.toml:

cotis-wgpu = { version = "0.1.0-alpha", features = ["complex-color"] }