def paint.limit

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

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

5222# The least coverage the enclosing clips leave at p.
5223def paint.limit(clips: List<&2, Clip>, +p: Point, +acc: F32) -> F32:
5224  match clips:
5225    case Nil{}: acc
5226    case Con{c, rest}: paint.limit(rest, p, U.min(acc, clip.limit(c, p)))

Uses (6)

Used by (1)