makepad_image_formats/image.rs
1// image_formats::image
2// by Desmond Germans, 2019
3
4#[derive(Default)]
5pub struct ImageBuffer {
6 pub width: usize,
7 pub height: usize,
8 pub data: Vec<u32>,
9}
10
11impl ImageBuffer {
12 pub fn new(width: usize,height: usize) -> ImageBuffer {
13 ImageBuffer {
14 width: width,
15 height: height,
16 data: vec![0; width * height],
17 }
18 }
19}