Struct mon_artist::svg::Svg
[−]
[src]
pub struct Svg { /* fields omitted */ }
Methods
impl Svg
[src]
fn new(width: u32, height: u32) -> Svg
Create an SVG doc of given width
and height
.
fn insert_attribute<S1, S2>(&mut self, attr: S1, val: S2) where S1: Into<String>, S2: Into<String>
Add (or overwrite) an attribute on the SVG document.
fn version(&self) -> &str
Returns the version of the SVG document. Documents start by default at version 1.1.
fn children(&self) -> &[Element]
Returns the element children of the SVG document.
fn width(&self) -> u32
Returns the width of the SVG document.
fn height(&self) -> u32
Returns the height of the SVG document.
fn add_child_shape<S: IntoShape>(&mut self, s: S)
Adds the given shape as a child element.
fn add_def<Def: Identified>(&mut self, def: Def)
Adds the given named object as an (unrendered but referencable) definition.