def tile.read
import gralha-svg-render@0.1.0.1/svg.bend as Svgimport Base
import gralha-image@0.1.0.1/image.bend as Img
2346# Nearest tile pixel under a pattern-space point.
2347def tile.read(+pixels: Img.Pixels, +side: U32, +wd: U32, +ht: U32, +w: F32, +h: F32, q: Point) -> Img.Color:
2348 Point{x, y} = q
2349 Img.pixels.get(pixels, side, tile.cell(x, w, wd), tile.cell(y, h, ht))