Svg.compile.work: def of gralha-svg-render@0.1.0.1 Import: import gralha-svg-render@0.1.0.1/svg.bend as Svg Lines 3142-3161 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=3142&end_line=3161 import Base import gralha-text-scan@0.1.0.1/scan.bend as U import gralha-xml-doc@0.1.0.1/xml.bend as XML import gralha-css-style@0.1.0.1/css.bend as CSS def compile.work(+fuel: Nat, work: Work, +inherited: Style, +m: Matrix, +w: F32, +h: F32, +all: List<&2, XML.Element>, +root: Bool, +active: List<&2, String>, +scale: F32) -> List<&2, Scene>: match fuel work: case 0n _: Nil{} case 1n+d Pending{xs}: match xs: case Nil{}: Nil{} case Con{XML.Element{tagname, attrs, kids, txt}, rest}: compile.work(fuel, Prepared{XML.attrs.take(image.layout.attrs(CSS.properties(attrs), w, h), "d"), tagname, kids, rest}, inherited, m, w, h, all, root, active, scale) case 1n+d Prepared{XML.Taken{data, as0}, tagname, kids, rest}: +as = as0 +ks = kids +n = tagname scenes.append(compile.node(n, as, ks, element.viewport(n, as, m, w, h, root), inherited, all, active, scale, data, used => nodes => mat => vw => vh => compile.work(d, Pending{nodes}, style.default(), mat, vw, vh, all, False{}, Con{used, active}, scale), used => sc => nodes => mat => vw => vh => compile.work(d, Pending{nodes}, style.default(), mat, vw, vh, all, False{}, Con{used, active}, sc), used => sc => nodes => mat => vw => vh => compile.work(d, Pending{nodes}, style.default(), mat, vw, vh, all, False{}, Con{used, active}, sc), nodes => mat => vw => vh => compile.work(d, Pending{nodes}, style.default(), mat, vw, vh, all, False{}, active, scale), style => mat => vw => vh => compile.work(U.choose(Nat, U.string.equal(XML.attr.get(as, "#marker-source", ""), ""), fuel, d), Pending{ks}, U.choose(Style, U.string.equal(n, "#svg-image"), style.default(), style), mat, vw, vh, U.choose(List<&2, XML.Element>, U.string.equal(n, "#svg-image"), resources(ks, Nil{}), all), False{}, U.choose(List<&2, String>, U.string.equal(n, "#svg-image"), Nil{}, U.choose(List<&2, String>, U.string.equal(XML.attr.get(as, "#marker-source", ""), ""), active, Con{XML.attr.get(as, "#marker-source", ""), active})), scale)), compile.work(fuel, Pending{rest}, inherited, m, w, h, all, root, active, scale)) Uses (23): 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=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=gralha-css-style@0.1.0.1/css.bend&name=properties https://jend.leeeet.dev/definition.txt?path=gralha-svg-render@0.1.0.1/svg.bend&name=Brush https://jend.leeeet.dev/definition.txt?path=gralha-svg-render@0.1.0.1/svg.bend&name=Matrix https://jend.leeeet.dev/definition.txt?path=gralha-svg-render@0.1.0.1/svg.bend&name=Scene https://jend.leeeet.dev/definition.txt?path=gralha-svg-render@0.1.0.1/svg.bend&name=Style https://jend.leeeet.dev/definition.txt?path=gralha-svg-render@0.1.0.1/svg.bend&name=Work https://jend.leeeet.dev/definition.txt?path=gralha-svg-render@0.1.0.1/svg.bend&name=compile.node https://jend.leeeet.dev/definition.txt?path=gralha-svg-render@0.1.0.1/svg.bend&name=element.viewport https://jend.leeeet.dev/definition.txt?path=gralha-svg-render@0.1.0.1/svg.bend&name=image.layout.attrs https://jend.leeeet.dev/definition.txt?path=gralha-svg-render@0.1.0.1/svg.bend&name=resources https://jend.leeeet.dev/definition.txt?path=gralha-svg-render@0.1.0.1/svg.bend&name=scenes.append https://jend.leeeet.dev/definition.txt?path=gralha-svg-render@0.1.0.1/svg.bend&name=style.default 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=string.equal https://jend.leeeet.dev/definition.txt?path=gralha-xml-doc@0.1.0.1/xml.bend&name=Element https://jend.leeeet.dev/definition.txt?path=gralha-xml-doc@0.1.0.1/xml.bend&name=Taken https://jend.leeeet.dev/definition.txt?path=gralha-xml-doc@0.1.0.1/xml.bend&name=attr.get https://jend.leeeet.dev/definition.txt?path=gralha-xml-doc@0.1.0.1/xml.bend&name=attrs.take