Svg.filter.blend.channel: def of gralha-svg-render@0.1.0.1 Import: import gralha-svg-render@0.1.0.1/svg.bend as Svg Lines 4552-4565 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=4552&end_line=4565 import Base import gralha-text-scan@0.1.0.1/scan.bend as U def filter.blend.channel(+a: F32, +b: F32, kind: U32) -> F32: match kind: case 1: (a * b : F32) case 2: (a + b - a * b : F32) case 3: U.min(a, b) case 4: U.max(a, b) case 5: filter.blend.hard(b, a) case 6: U.choose(F32, F32.is_le(b, 0.0), 0.0, U.choose(F32, F32.is_ge(a, 1.0), 1.0, U.min(1.0, (b / U.max(0.0000001, (1.0 - a : F32)) : F32)))) case 7: U.choose(F32, F32.is_ge(b, 1.0), 1.0, U.choose(F32, F32.is_le(a, 0.0), 0.0, (1.0 - U.min(1.0, ((1.0 - b) / U.max(0.0000001, a) : F32)) : F32))) case 8: filter.blend.hard(a, b) case 9: filter.blend.soft(a, b) case 10: F32.abs((a - b : F32)) case 11: (a + b - 2.0 * a * b : F32) case _: a Uses (17): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.abs 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.div https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.is_ge https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.is_le 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=Base/base.bend&name=Word.Con https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.Nil https://jend.leeeet.dev/definition.txt?path=gralha-svg-render@0.1.0.1/svg.bend&name=filter.blend.hard https://jend.leeeet.dev/definition.txt?path=gralha-svg-render@0.1.0.1/svg.bend&name=filter.blend.soft https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=choose https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=max https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=min