Expand description
Debug bounding-box overlays for layout / margin inspection.
Not for publication figures — a diagnostic aid for boxes and margins.
When crate::scene::MoleculeIn::debug_box (or cascading opts) is on,
depict emits stroked rectangles for label ink bounds and the mol canvas.
Compose adds a document-level box around the full scene. Atom/bond stroke
primitives are never wrapped. Strokes use partial opacity so stacked
boxes remain distinguishable where they overlap.
Constants§
- DEBUG_
BOX_ DASH - DEBUG_
BOX_ OPACITY - Partial alpha so overlapping label / mol / scene borders stay readable.
- DEBUG_
BOX_ STROKE - Stroke color for debug rectangles (high-contrast, not chem ink).
- DEBUG_
BOX_ STROKE_ PX - Hairline in house SCALE units (scales with diagram scale).
Functions§
- debug_
rect - Axis-aligned debug rectangle as a closed path primitive.
- label_
debug_ rect - Label ink AABB → debug rect (
debug-box debug-box-label …). - mol_
debug_ rect - Mol viewport / canvas box.
- scene_
debug_ rect - Full scene / document box.