def text.path.target
gralha-svg-render@0.1.0.1 · svg.bend:3273
import gralha-svg-render@0.1.0.1/svg.bend as Svg
import Base
import gralha-xml-doc@0.1.0.1/xml.bend as XML
import gralha-css-style@0.1.0.1/css.bend as CSS
3273
3274def text.path.target(target: Maybe<&2, XML.Element>, +w: F32, +h: F32) -> List<&2, XML.Attr>:
3275 match target:
3276 case None{}: Nil{}
3277 case Some{XML.Element{n, as, kids, txt}}:
3278 +attrs = CSS.properties(as)
3279 Con{XML.Attr{"#text-path-data", shape.data(n, attrs, w, h, XML.attr.get(attrs, "d", ""))}, Con{XML.Attr{"#text-path-transform", XML.attr.get(attrs, "transform", "")}, Con{XML.Attr{"#text-path-length", XML.attr.get(attrs, "pathLength", "0")}, Nil{}}}}