def filter.spec

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

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
import gralha-xml-doc@0.1.0.1/xml.bend as XML

2624def filter.spec(+as: List<&2, XML.Attr>, all: List<&2, XML.Element>, box: Bounds, m: Matrix, w: F32, h: F32) -> FilterEffect:
2625  +value = U.trim.both(XML.attr.get(as, "filter", "none"))
2626  +id = U.drop(U.unquote(U.trim.both(U.scan.head(U.until(U.drop(value, "url("), 41, "")))), "#")
2627  U.branch(FilterEffect, U.prefix(value, "url("), _ => filter.resource(resource.find(all, id), box, m, w, h), _ => NoFilter{})

Uses (17)

Used by (1)