Skip to main content

Module paint

Module paint 

Source
Expand description

Portable paint primitives — Color and Stroke.

These types are the kernel’s framework-agnostic color + stroke vocabulary. Host painters convert to backend-specific types (egui Color32, iced Color, vello / wgpu colors) at the draw- call boundary; portable descriptors flow through kernel’s overlay surface (OverlayStrokePass), through host-contract ports, and through graph-canvas’s packet::SceneDrawItem / node_style / derive surfaces — all without coupling the kernel to a renderer crate.

Why these live in kernel, not graph-canvas: previously they lived in graph_canvas::packet, with kernel importing them — that made kernel → graph-canvas an upward dependency that blocked the cartography layer brief’s revised §9 step 4 (the graph-layout extraction). Moving these into the kernel and having graph-canvas re-export them reverses the edge to its natural direction (kernel is foundational; everything else depends on it). The graph-canvas public API stays stable through the re-export.

§Host palettes

Color is the f32-channel form used for renderer-style descriptors. u8 host-palette colours (theme tokens and the like) are tinct’s Srgb, which the kernel’s former color::Color32 merged into on 2026-09-24.

Structs§

Color
A color in linear RGBA, 0.0–1.0 per channel.
Stroke
Stroke style for lines and shape outlines.