[][src]Function geopattern::piet_mondrian

pub fn piet_mondrian(
    splits: &[(PietMondrianSplitType, f32)],
    (width, height): (f32, f32),
    fill: &[(&str, f32)],
    stroke: (&str, f32, f32),
    background_color: &str
) -> Document

Piet Mondrian

https://generativeartistry.com/tutorials/piet-mondrian/

use geopattern::{piet_mondrian, PietMondrianSplitType};

let c = piet_mondrian(
    &vec![
        (PietMondrianSplitType::X, 80.0),
        (PietMondrianSplitType::Y, 220.0),
    ],
    (300.0, 300.0),
    &vec![("#FFF", 1.0), ("#00F", 1.0), ("#F00", 1.0), ("#FFF", 1.0)],
    ("#222", 8.0, 1.0),
    "#FFF",
);

println!("{}", c);