aboutsummaryrefslogtreecommitdiff
path: root/evc/src/frame.rs
blob: 8e908322143970914853cd3c554b9a9009d7a551 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::pixel::Pixel;


pub struct Frame {
    size: (usize, usize),
    buffer: Vec<Vec<Pixel>>,
}

impl Frame {
    pub fn new(size: (usize, usize)) -> Self {
        Self {
            size,
            buffer: (0..size.0)
                .map(|_| (0..size.1).map(|_| Pixel::default()).collect())
                .collect(),
        }
    }
}