def style.inherit.picked

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

import gralha-svg-render@0.1.0.1/svg.bend as Svg
import Base
import gralha-text-scan@0.1.0.1/scan.bend as U

1961def style.inherit.picked(+s: Style, p: Picked, +ref: F32) -> Style:
1962  Style{fill, stroke, col, fo, so, width, even, visible, ss, ms, rendering, order} = s
1963  Picked{pfill, pstroke, pcolor, pfo, pso, pwidth, prule, pvis, prender, porder, pcap, pjoin, plimit, pdash, poffset, pvector, pms, pmm, pme} = p
1964  +po = order
1965  Style{style.present(pfill, fill, "black", True{}), style.present(pstroke, stroke, "none", True{}), style.present(pcolor, col, "black", True{}),
1966    style.number.present(pfo, fo, 1.0, v => color.opacity(v, fo)),
1967    style.number.present(pso, so, 1.0, v => color.opacity(v, so)),
1968    U.max(0.0, style.number.present(pwidth, width, 1.0, v => U.unit(U.number(v), ref))),
1969    U.string.equal(style.present(prule, U.choose(String, even, "evenodd", "nonzero"), "nonzero", True{}), "evenodd"),
1970    U.string.equal(style.present(pvis, U.choose(String, visible, "visible", "hidden"), "visible", True{}), "visible"), stroke.inherit(ss, pcap, pjoin, plimit, pdash, poffset, pvector), marker.style(ms, pms, pmm, pme), style.present(prender, rendering, "auto", True{}), paint.order.pick(porder, po)}

Uses (16)

Used by (1)