[][src]Struct svg_minimal::MinSVG

pub struct MinSVG { /* fields omitted */ }

Create an svg structure to hold one or more paths with options to set the viewbox, xmlns, and background color

Implementations

impl MinSVG[src]

pub fn new(viewbox: [usize; 4]) -> MinSVG[src]

Construct a new svg with the required viewBox

Example: [0,0,100,100] will result in viewBox=\"0 0 100 100\"

pub fn set_xmlns(&mut self, xmlns: String)[src]

Set a custom namespace. If not invoked the namespace will be http://www.w3.org/2000/svg

pub fn set_background_color(&mut self, color: Color)[src]

Set a background color. If not invoked there will be none.

pub fn add_path(&mut self, path: Path)[src]

Add a path created with svg_minimal::Path to the svg.

pub fn create(&mut self) -> String[src]

Will return a complete svg with all the requirements.

Auto Trait Implementations

impl RefUnwindSafe for MinSVG

impl Send for MinSVG

impl Sync for MinSVG

impl Unpin for MinSVG

impl UnwindSafe for MinSVG

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.