def arc.center
gralha-svg-render@0.1.0.1 · svg.bend:374
import gralha-svg-render@0.1.0.1/svg.bend as Svg
import Base
374def arc.center(+p: Path, +q: Point, +cmd: U32, +rx: F32, +ry: F32, +phi: F32,
375 +xp: F32, +yp: F32, +coef: F32, sweep: F32) -> Path:
376 Path{cur, start, ctrl, old, prev, es, trace, tol} = p
377 +cx = (coef * rx * yp / ry : F32)
378 +cy = (0.0 - coef * ry * xp / rx : F32)
379 center = point.add(point.mid(cur, q), Point{(F32.cos(phi) * cx - F32.sin(phi) * cy : F32),
380 (F32.sin(phi) * cx + F32.cos(phi) * cy : F32)})
381 arc.angles(p, q, cmd, rx, ry, phi, xp, yp, cx, cy, center, sweep)