pub struct Drawing {
pub shapes: Vec<Shape>,
pub shape_layers: Vec<i32>,
pub shape_classes: Vec<Option<String>>,
pub shape_spans: Vec<Option<Span>>,
pub bbox: Bbox,
pub prelude_thick: f64,
pub canvas_margin: CanvasMargin,
pub canvas: Option<Bbox>,
pub anims: Vec<Anim>,
pub diagnostics: Vec<String>,
pub warnings: Vec<Diagnostic>,
}Expand description
A fully evaluated drawing.
Fields§
§shapes: Vec<Shape>§shape_layers: Vec<i32>Render layer per shape. Lower layers are emitted first; equal layers keep source order and shape ids stable.
shape_classes: Vec<Option<String>>rpic extension: CSS class hook per shape, emitted on the shape’s
<g id="sN"> group. Inert unless the host document styles it; None
keeps the group byte-identical to classic output.
shape_spans: Vec<Option<Span>>Source span of the statement that produced each shape (None for
shapes without one). Drives the per-object geometry export; never
affects rendering.
bbox: Bbox§prelude_thick: f64Global linethick in points after picture-wide sizing, used only for
dpic-style backend prelude padding. Per-shape strokes keep their own
unscaled point thickness.
canvas_margin: CanvasMarginExtra canvas whitespace in inches. This is an rpic extension inspired by Pikchr: it affects native backend framing only, not pic geometry.
canvas: Option<Bbox>rpic extension: a fixed page rectangle (canvas from … to …) in model
space. When set, the SVG viewBox is derived from it instead of the
content bounds; content outside is clipped by the viewBox.
anims: Vec<Anim>§diagnostics: Vec<String>Lines emitted by pic print statements, without trailing newlines.
warnings: Vec<Diagnostic>Non-fatal compiler warnings for accepted but likely unintended input.