def xscan.fix

gralha-coverage@0.1.0.1 · cover.bend:998

import gralha-coverage@0.1.0.1/cover.bend as Cover
import Base

998# A row whose exact areas showed an overlap is scanned again with the
999# sub-scanlines over its own pieces; other rows keep their runs. Either way
1000# the pieces the next row no longer reaches are retired.
1001def xscan.fix(bad: Bool, runs: List<&2, Run>, active: List<&2, Piece>, +y: F32, +sub: U32, +w: U32) -> List<&2, Run> & List<&2, Piece>:
1002  match bad:
1003    case False{}: (runs, pieces.retire(active, (y + 1.0 : F32), Nil{}))
1004    case True{}:
1005      +act = active
1006      (rows.head(scan.rows(1, sub, lines.sort(pieces.lines(act, y, Nil{})), False{}, w)), pieces.retire(act, (y + 1.0 : F32), Nil{}))

Uses (14)

Used by (1)