def reduce.cols
gralha-svg-render@0.1.0.1 · svg.bend:4271
import gralha-svg-render@0.1.0.1/svg.bend as Svg
import Base
import gralha-image@0.1.0.1/image.bend as Img
4271def reduce.cols(+pixels: Img.Pixels, +side: U32, +x: U32, +y: U32, +lo: F32, +hi: F32, +wy: F32, n: Nat, acc: Img.Color) -> Img.Color:
4272 match n:
4273 case 0n: acc
4274 case 1n+d: reduce.cols(pixels, side, (x + 1 : U32), y, lo, hi, wy, d, color.add(acc, color.fade(Img.pixels.get(pixels, side, x, y), (reduce.weight(lo, hi, x) * wy : F32))))
4275
4276@unsafe