diff options
author | Nicholas Johnson <nick@nicholasjohnson.ch> | 2024-04-19 00:00:00 +0000 |
---|---|---|
committer | Nicholas Johnson <nick@nicholasjohnson.ch> | 2024-04-19 00:00:00 +0000 |
commit | b619c48236e620f272162e412525502355da144220f813f5c3ef8ea13b975ea1 (patch) | |
tree | 5f80eedc10813dd44427a91544fb7eaeb0ebe3addc6921c4567996b55bcc35a0 /src/hitomezashi.rs | |
parent | 9bd537c6894ce02c8d9114154a05e90881d06820e27653246117752882a9179f (diff) | |
download | hitomezashi-rs-b619c48236e620f272162e412525502355da144220f813f5c3ef8ea13b975ea1.tar.gz hitomezashi-rs-b619c48236e620f272162e412525502355da144220f813f5c3ef8ea13b975ea1.zip |
Set first square to always opaque.
This is so that the user always sees something, even for a 1x1 pattern.
Diffstat (limited to 'src/hitomezashi.rs')
-rw-r--r-- | src/hitomezashi.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hitomezashi.rs b/src/hitomezashi.rs index e8d4a65..7b74998 100644 --- a/src/hitomezashi.rs +++ b/src/hitomezashi.rs @@ -34,8 +34,8 @@ pub fn hitomezashi(width: usize, height: usize, skew: Option<f64>) { let mut rng = rand::thread_rng(); let brn = Bernoulli::new(skew).unwrap(); - // the first square (upper left corner) is always transparent - let init_bit: bool = true; + // the first square (upper left corner) is always opaque + let init_bit: bool = false; let mut row_bits: Vec<bool> = Vec::with_capacity(height - 1); |