Skip to main content

bond_strokes

Function bond_strokes 

Source
pub fn bond_strokes(
    x1: f64,
    y1: f64,
    x2: f64,
    y2: f64,
    order: f64,
    interior: Option<(f64, f64)>,
    stereo: Option<&str>,
    trims: Option<&EndTrims>,
    stroke_width: Option<f64>,
) -> BondStrokes
Expand description

Build skeleton / offset / stereo strokes for one bond.

stereo: up | down | either | none | None. Thin end of a solid wedge, and the thick end of a hashed wedge, are at (x1, y1). Callers pass the stereocenter first.

trims are per-line inset distances at (x1, y1) then (x2, y2) for a centered multiple bond (see join_centered_multibonds).

stroke_width defaults to STROKE_PX when None — pass a weight-scaled width when mol weight thickens ink.