RawSvg
Raw SVG the caller vouches for, emitted verbatim exactly once.
bounds is mandatory because the renderer cannot parse the markup. It is the only way the fragment takes part in Scene::bounds.
Used as Input
0
functions accept this type(+1 nested)
Used as Output
0
functions return this type(+8 nested)
Type Definition
19 nested items
struct— Raw SVG the caller vouches for, emitted verbatim exactly once.
class:Vec<String>= []— Class names, joined with spaces into one
class attribute.data:Vec<(String, String)>= []—
(name, value) pairs, each emitted as data-<name>="<value>".extra:Vec<(String, String)>= []— Free-form attributes, escaped but otherwise untouched.
id:Option<String>= null— The element's
id.style:Option<String>= null— Inline CSS, emitted as the
style attribute.h*:f64— Height.
w*:f64— Width.
x*:f64— Left edge.
y*:f64— Top edge.
markup*:String— SVG markup, emitted unescaped. The caller is responsible for it being well-formed and safe.
Example JSON Value
json
{
"bounds": {
"h": 0.2,
"w": 0.2,
"x": 0.2,
"y": 0.2
},
"markup": "example"
}