Svg.tile.blend: def of gralha-svg-render@0.1.0.1 Import: import gralha-svg-render@0.1.0.1/svg.bend as Svg Lines 2331-2341 of gralha-svg-render@0.1.0.1/svg.bend: https://jend.leeeet.dev/read.txt?path=gralha-svg-render@0.1.0.1/svg.bend&start_line=2331&end_line=2341 import Base import gralha-image@0.1.0.1/image.bend as Img def tile.blend(+pixels: Img.Pixels, +side: U32, +width: U32, +height: U32, +fx: F32, +fy: F32) -> Img.Color: +ix = F32.floor(fx) +iy = F32.floor(fy) +dx = (fx - ix : F32) +dy = (fy - iy : F32) +x0 = tile.index(ix, width) +x1 = tile.index((ix + 1.0 : F32), width) +y0 = tile.index(iy, height) +y1 = tile.index((iy + 1.0 : F32), height) color.add(color.add(tile.corner(pixels, side, x0, y0, ((1.0 - dx) * (1.0 - dy) : F32)), tile.corner(pixels, side, x1, y0, (dx * (1.0 - dy) : F32))), color.add(tile.corner(pixels, side, x0, y1, ((1.0 - dx) * dy : F32)), tile.corner(pixels, side, x1, y1, (dx * dy : F32)))) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.floor https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=gralha-image@0.1.0.1/image.bend&name=Color https://jend.leeeet.dev/definition.txt?path=gralha-image@0.1.0.1/image.bend&name=Pixels https://jend.leeeet.dev/definition.txt?path=gralha-svg-render@0.1.0.1/svg.bend&name=color.add https://jend.leeeet.dev/definition.txt?path=gralha-svg-render@0.1.0.1/svg.bend&name=tile.corner https://jend.leeeet.dev/definition.txt?path=gralha-svg-render@0.1.0.1/svg.bend&name=tile.index