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.
crate::doc::rendersupplies coords + chem metadata (CoordGen + align).- Rust builds a
Sceneof typed primitives (paths, circles, …). crate::scene_to_svgemits SVG; hosts only wrap (IPython /<img>).
Structs§
- Align
Debug - Stamped alignment correspondence for
MoleculeIn::debug_alignpaint. - AtomIn
- Atom input for a molecule depict call (SVG-space coords from the caller).
- BondIn
- Bond input (indices into
AtomIn::index). - Layer
- Molecule
In - One molecule ready to paint (coords already in SVG /
SCALEspace). - 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§
- Align
Debug Role - Role of a molecule in an alignment debug overlay.
- Aromatic
Style - How fully aromatic rings are drawn.
- Attach
- How a ring-center stem attaches to its
SpokeIn::endpts. - Layer
Name - Layer name inside a molecule viewport.
- Primitive
- One drawable primitive in SVG space (+Y down).
- Text
Anchor - Horizontal text anchor (SVG
text-anchor).
Functions§
- scale_
path_ d - Multiply every numeric token in an SVG path
d(M/L/Z polygons).