Skip to main content

Module debug_box

Module debug_box 

Source
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.