def segment.at
import gralha-svg-render@0.1.0.1/svg.bend as Svgimport Base
import gralha-text-scan@0.1.0.1/scan.bend as U
1665# ---- dashes as polylines ----
1666# The point at distance d along the segments, and the direction there.
1667def segment.at(s: Segment, +d: F32) -> Point:
1668 Segment{px, py, qx, qy, ux, uy, len, distance} = s
1669 point.add(Point{px, py}, point.scale(Point{ux, uy}, U.clamp((d - distance : F32), 0.0, len)))