aboutsummaryrefslogtreecommitdiff
path: root/evc/src/frame.rs
diff options
context:
space:
mode:
Diffstat (limited to 'evc/src/frame.rs')
-rw-r--r--evc/src/frame.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/evc/src/frame.rs b/evc/src/frame.rs
new file mode 100644
index 0000000..8e90832
--- /dev/null
+++ b/evc/src/frame.rs
@@ -0,0 +1,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(),
+ }
+ }
+}