Svg.filter.transfer: def of gralha-svg-render@0.1.0.1 Import: import gralha-svg-render@0.1.0.1/svg.bend as Svg Lines 4524-4527 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=4524&end_line=4527 import Base import gralha-text-scan@0.1.0.1/scan.bend as U import gralha-image@0.1.0.1/image.bend as Img def filter.transfer(r: Transfer, g: Transfer, b: Transfer, a: Transfer, c: Img.Color) -> Img.Color: Img.Color{cr, cg, cb, ca} = c +alpha = ca color.premultiply(Img.Color{transfer.apply(r, (cr / U.max(alpha, 0.0000001) : F32)), transfer.apply(g, (cg / U.max(alpha, 0.0000001) : F32)), transfer.apply(b, (cb / U.max(alpha, 0.0000001) : F32)), transfer.apply(a, alpha)}) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.div 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-svg-render@0.1.0.1/svg.bend&name=Transfer https://jend.leeeet.dev/definition.txt?path=gralha-svg-render@0.1.0.1/svg.bend&name=color.premultiply https://jend.leeeet.dev/definition.txt?path=gralha-svg-render@0.1.0.1/svg.bend&name=transfer.apply https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=max