mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-03 18:29:09 +00:00
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:
parent
8d4927bac2
commit
d16a335bc4
6 changed files with 37 additions and 25 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue