1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
//! # lievisual
//!
//! Declarative visual scene (IR) + pluggable rendering backends.
//!
//! ## Design overview
//! - **IR / backend separation**: [`scene`] describes *what* to draw (primitives + layered
//! `z_index` + transforms + node attributes), while [`render::Renderer`] describes *how*.
//! Adding a backend (SVG / vello_cpu / GPU) requires no changes to the IR.
//! - **Unified layering and transforms**: `z_index` / `Transform` are promoted to fields of
//! [`scene::SceneNode`]; node-level `opacity` / `name` / `visible` / `clip` also belong to the
//! node (recursively applied to a Group subtree), so new primitive variants need no field churn.
//! - **Layers**: [`scene::Scene`] may carry an ordered set of [`scene::Layer`] (bottom to top)
//! that controls `visible` / `opacity` / `transform` / `name` for the whole layer; nodes inside
//! are then stably sorted by `z_index`. `nodes` is kept as the default (bottom-most) layer.
//! - **Rich primitives**: [`scene::Element`] provides rectangles, circles, ellipses, rounded
//! rectangles, lines, polylines, polygons, arcs, sectors, paths, gradient paths, text, and
//! groups — covering common chart / flowchart / Markdown needs.
//! - **Varied fills**: solid color, linear gradient, radial gradient ([`scene::Fill`]); strokes
//! support line caps / joins, dashes (`dash_array` / `dash_offset`), and `miter_limit`.
//! - **Path operations** ([`path`]): boolean combinations (`union` / `intersect` / `difference` /
//! `xor`), stroke-to-path (`outline`), arc-length measurement (`path_length` /
//! `point_at_length` / `trim`) and offset / inset — all **build-time** on
//! [`geometry::BezPath`], so results render identically on every backend. Boolean ops flatten
//! curves (via `i_overlay`), so their output is polygonal.
//! - **Hand-drawn style (opt-in)**: [`sketch`] is a post-pass that turns selected elements into
//! rough, pen-drawn outlines plus [`scene::Fill::Sketch`] fills. It never runs on its own: call
//! [`sketch::roughen_scene`] (or the selective [`sketch::roughen_scene_if`]) to enable it, and
//! pick which element kinds participate with [`sketch::SketchOptions::kinds`].
//! - **Text (rich-text core)**: [`scene::Element::Text`] is built around styled spans
//! ([`text::RichSpan`]); typesetting / measurement go through the `&[RichSpan]` entry points
//! ([`text::measure_text`] / [`text::layout_text`]); it can carry a pre-laid-out
//! [`text::TextLayout`]. Raster backends draw glyphs precisely via layout, while the SVG backend
//! falls back to `<text>`.
//!
//! ## Backend support (all rendering backends enabled by default, no feature gate)
//! - [`render::SvgRenderer`]: emits a vector SVG string, with scene metadata (`title` /
//! `description` / `scale`).
//! - [`render::VelloPixmapRenderer`]: vello_cpu rasterization → PNG bytes.
//!
//! ## Geometry and coordinates
//! Geometric base types ([`Point`] / [`Rect`] / [`BezPath`] / [`Affine`], etc.) are re-exported
//! directly from kurbo (see [`geometry`]), giving zero-cost interoperability with the internal
//! geometry types of vello / parley; [`Color`] / [`Transform`] are defined by lievisual itself.
// re-export parley
pub use parley;
// re-export kurbo
pub use kurbo;
pub use ;
pub use ;
pub use ;
pub use Pixmap;
pub use ;
pub use ;
pub use ;