Skip to main content
Rust4PM

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.
attrs:Attrs— Escape-hatch attributes available on every drawable.
id:Option<String>— The element's id.
style:Option<String>— Inline CSS, emitted as the style attribute.
bounds*:SceneRect— An axis-aligned rectangle, given by its top-left corner and its size.
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"
}