def shape.ellipse.path

gralha-svg-render@0.1.0.1 · svg.bend:872

import gralha-svg-render@0.1.0.1/svg.bend as Svg
import Base
import gralha-text-scan@0.1.0.1/scan.bend as U

872def shape.ellipse.path(+x: F32, +y: F32, +rx: F32, +ry: F32) -> String:
873  U.branch(String, F32.is_gt(rx, 0.0) && F32.is_gt(ry, 0.0),
874    _ => "M" ++ xy((x + rx : F32), y) ++ "A" ++ xy(rx, ry) ++ "0 1 1 " ++ xy((x - rx : F32), y)
875      ++ "A" ++ xy(rx, ry) ++ "0 1 1 " ++ xy((x + rx : F32), y) ++ "Z", _ => "")

Uses (9)

Used by (1)