densa_draw/lib.rs
1//! A frame's display list, independent of any GPU API.
2//!
3//! Painters draw through a [`Canvas`]: filled rectangles and glyphs (from a shared
4//! `densa_text::GlyphCache`) become [`Instance`]s in an [`InstanceBuffer`], one quad each, in
5//! the vertex layout `densa-render` uploads and draws in a single instanced draw call. Keeping
6//! the list GPU-free makes every painter testable without a GPU, and lets other backends
7//! draw the same list.
8//!
9//! Drawing allocates nothing once the frame's glyphs are cached.
10
11mod canvas;
12mod instance;
13
14pub use canvas::{Canvas, CanvasState};
15pub use densa_core::{Color, Point, Rect, Size};
16pub use instance::{Instance, InstanceBuffer};