Skip to main content

Module scene

Module scene 

Source
Expand description

Drawable scene document — engine-neutral primitives shared by Python & JS.

One molecule → one Viewport inside a Scene. Circle overlays and shade disks are layers on that viewport. Multi-mol / ELK schemes compose several viewports into one scene.

  1. crate::doc::render supplies coords + chem metadata (CoordGen + align).
  2. Rust builds a Scene of typed primitives (paths, circles, …).
  3. crate::scene_to_svg emits SVG; hosts only wrap (IPython / <img>).

Structs§

AlignDebug
Stamped alignment correspondence for MoleculeIn::debug_align paint.
AtomIn
Atom input for a molecule depict call (SVG-space coords from the caller).
BondIn
Bond input (indices into AtomIn::index).
Layer
MoleculeIn
One molecule ready to paint (coords already in SVG / SCALE space).
Scene
Full drawable document before SVG/HTML serialization.
SpokeIn
Segment drawn from a ring centroid to a substituent (CX m:).
Viewport
One molecule viewport in a diagram (after ELK/grid placement).

Enums§

AlignDebugRole
Role of a molecule in an alignment debug overlay.
AromaticStyle
How fully aromatic rings are drawn.
Attach
How a ring-center stem attaches to its SpokeIn::endpts.
LayerName
Layer name inside a molecule viewport.
Primitive
One drawable primitive in SVG space (+Y down).
TextAnchor
Horizontal text anchor (SVG text-anchor).

Functions§

scale_path_d
Multiply every numeric token in an SVG path d (M/L/Z polygons).