unify view_clips

This commit is contained in:
🪞👃🪞 2025-02-08 22:34:32 +01:00
parent 7b3bbc5590
commit d1bb33dc41
11 changed files with 168 additions and 128 deletions

View file

@ -15,6 +15,11 @@ pub fn buffer_update (buf: &mut Buffer, area: [u16;4], callback: &impl Fn(&mut C
pub height: usize,
pub content: Vec<Cell>
}
impl std::fmt::Debug for BigBuffer {
fn fmt (&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
write!(f, "[BB {}x{} ({})]", self.width, self.height, self.content.len())
}
}
impl BigBuffer {
pub fn new (width: usize, height: usize) -> Self {
Self { width, height, content: vec![Cell::default(); width*height] }