[][src]Function geopattern::tesselation

pub fn tesselation(
    length: f32,
    fill: &[(&str, f32)],
    stroke: (&str, f32),
    background_color: &str
) -> Document

tesselation

use geopattern::tesselation;

let c = tesselation(
    60.0,
    &(0..20)
        .map(|v| {
            (
                if v & 1 == 0 { "#222" } else { "#ddd" },
                0.02 + (v as f32) / 4.0,
            )
        })
        .collect::<Vec<(&str, f32)>>(),
    ("#ddd", 0.2),
    "#987987",
);

println!("{}", c);