[][src]Function geopattern::concentric_circles

pub fn concentric_circles(
    diameter: f32,
    concentric_width: f32,
    (width, height): (usize, usize),
    fill_outer: &[(&str, f32)],
    fill_inner: &[(&str, f32)],
    background_color: &str
) -> Document

concentric circles

use geopattern::concentric_circles;

let c = concentric_circles(
    20.0,
    4.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)>>(),
    &(0..4)
        .map(|v| {
            (
                if v & 1 == 0 { "#222" } else { "#ddd" },
                0.02 + (v as f32) / 4.0,
            )
        })
        .collect::<Vec<(&str, f32)>>(),
    "#987987",
);

println!("{}", c);