def stroke.coverage

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

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

1907def stroke.coverage(mesh: StrokeMesh, +p: Point) -> F32:
1908  StrokeMesh{stree, inv, cover} = mesh
1909  +cov = cover
1910  U.branch(F32, cover.present(cov), _ => cover.at(cov, p), _ => U.choose(F32, edge.tree.inside(stree, matrix.point(inv, p), False{}), 1.0, 0.0))

Uses (10)

Used by (1)