def compile.geometry

gralha-svg-render@0.1.0.1 · svg.bend:3101

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

3101# A shape's edges and its marker instances. Path data is shared with the
3102# marker trace only when markers are wanted.
3103def compile.geometry(marked: Bool, data: String, +n: String, +attrs: List<&2, XML.Attr>, glyphs: List<&2, XML.Element>, +vw: F32, +vh: F32, +tol: F32, +style: Style, all: List<&2, XML.Element>, active: List<&2, String>) -> List<&2, Edge> & List<&2, XML.Element>:
3104  match marked:
3105    case False{}: (shape.children(n, attrs, glyphs, vw, vh, tol, data), Nil{})
3106    case True{}:
3107      +dd = data
3108      (shape.children(n, attrs, glyphs, vw, vh, tol, dd), marker.instances(n, Con{XML.Attr{"d", dd}, attrs}, style, all, active, vw, vh))

Uses (12)

Used by (1)