vectorview 0.1.0

A library to create vector images
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::enums::{Teeth, Expression};
use crate::svg::VectorView;
use svg::node::element::Group;

impl VectorView for Expression{
    fn make_image(&self, x:f64, y:f64, w:f64, h:f64, color:&str, opacity:f64) -> Group {
        match *self {
            Expression::Smile =>self.make_simple_body(x,y,w,h,color.clone(),"#00004a","orange", "#76612d"),
            _=> self.make_simple_body(x,y,w,h,color.clone(),"brown","purple", "green"),
        }
    }
    //fn make_mouth(&self, x:f64, y:f64, w:f64, h:f64, color:&str) -> Group {}
}