def dash.seek

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

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

1356def dash.seek(xs: List<&2, F32>, +offset: F32, +painted: Bool) -> DashCursor:
1357  match xs:
1358    case Nil{}: DashCursor{0.0, Nil{}, painted}
1359    case Con{h, t}:
1360      +len = h
1361      +tail = t
1362      U.branch(DashCursor, F32.is_le(offset, len), _ => DashCursor{(len - offset : F32), tail, painted},
1363        _ => dash.seek(tail, (offset - len : F32), Bool.not(painted)))

Uses (8)

Used by (2)