Add /cells
This commit is contained in:
parent
5e9a4277d0
commit
755889e82d
6 changed files with 114 additions and 1 deletions
|
|
@ -1,4 +1,5 @@
|
|||
mod calendar;
|
||||
mod cells;
|
||||
|
||||
use image::{Luma, Pixel, RgbaImage};
|
||||
use palette::{FromColor, IntoColor, LinLumaa};
|
||||
|
|
@ -24,6 +25,7 @@ pub enum Command {
|
|||
Photo { image: RgbaImage, title: String },
|
||||
ChatMessage { username: String, content: String },
|
||||
Calendar { year: i32, month: u8 },
|
||||
Cells { rule: u8, rows: u32, scale: u32 },
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
|
|
@ -77,6 +79,7 @@ impl Drawer {
|
|||
self.on_chat_message(username, content)?
|
||||
}
|
||||
Command::Calendar { year, month } => self.draw_calendar(year, month)?,
|
||||
Command::Cells { rule, rows, scale } => self.draw_cells(rule, rows, scale)?,
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue