SharedImageBuffer/SharedPixelBuffer: use u32 instead of usize

For width, height and stride that's a more natural choice that's also consistent
with what the image crate uses.
This commit is contained in:
Simon Hausmann 2022-01-27 16:51:20 +01:00 committed by Simon Hausmann
parent 8d4927bac2
commit d16a335bc4
6 changed files with 37 additions and 25 deletions

View file

@ -25,7 +25,7 @@ fn pdf(x: f64, y: f64) -> f64 {
fn render_plot(pitch: f32) -> sixtyfps::Image {
let mut pixel_buffer = SharedPixelBuffer::new(640, 480);
let size = (pixel_buffer.width() as u32, pixel_buffer.height() as u32);
let size = (pixel_buffer.width(), pixel_buffer.height());
let backend = BitMapBackend::with_buffer(pixel_buffer.make_mut_bytes(), size);