def filter.window.contains

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

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

4740def filter.window.contains(region: Bounds, tile: Bounds) -> U32:
4741  Bounds{x0, y0, x1, y1} = region
4742  Bounds{a, b, c, d} = tile
4743  U.choose(U32, F32.is_ge(a, x0) && F32.is_ge(b, y0) && F32.is_le(c, x1) && F32.is_le(d, y1), 1, 2)

Uses (6)

Used by (1)