[][src]Function geopattern::chevrons

pub fn chevrons(
    chevron_width: f32,
    (width, height): (usize, usize),
    fill: &[(&str, f32)],
    stroke: (&str, f32),
    background_color: &str
) -> Document

chevrons

use geopattern::chevrons;

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

println!("{}", c);