Expand description
Default data types shared across Cotis integrations.
This crate provides concrete element config structs and render command structs used by layout managers and renderers in the Cotis ecosystem.
Typical data flow:
- Build an
element_configs::ElementConfig. - The layout crate consumes that config and produces layout output.
- A pipe maps layout output to
render_commandsvalues. - A renderer draws those commands.
cotis-defaults depends on cotis-utils for shared primitives such as
BoundingBox, Vector2, and renderer context traits.
§Features
serialization: enables serde support for configs/commands and also enablescotis/serializationandcotis-utils/serialization.complex_color: enables layered/gradient color support throughcolors::ColorLayerfor backgrounds in style and commands.complex_colored_text: extendscomplex_colorto text color fields.child_wrapping: addsLayoutStyle::child_wrapping(currently experimental; not fully wired in all layout integrations).
§Text and fonts (evolving API)
Text config, font IDs, and measuring wiring are functional today but planned for refactoring. Treat text/font/measuring integration points as subject to change across minor versions until that refactor lands.
§Quick start
ⓘ
use cotis_defaults::element_configs::ElementConfig;
use cotis_defaults::element_configs::style::sizing::DoubleAxisSizing;
// Usually consumed by cotis-layout and transformed into render commands by a pipe.
let config: ElementConfig<'_, DoubleAxisSizing, (), (), ()> = ElementConfig::default();Modules§
- colors
- Base color types, gradients and layered paints.
- element_
configs - Element configuration structs consumed by layout integrations. Element configuration data passed into Cotis layout.
- generic_
image - Path-based generic image wrappers used by image configs.
- render_
commands - Render command structs consumed by renderer integrations.