Improve sixtyfps::Image::size() API for consistency

Make size() return an unsigned integer size type instead of floats.

cc #431
This commit is contained in:
Simon Hausmann 2022-01-27 21:35:05 +01:00 committed by Simon Hausmann
parent d16a335bc4
commit f31f4201c6
11 changed files with 84 additions and 81 deletions

View file

@ -9,7 +9,7 @@ use alloc::boxed::Box;
use alloc::rc::Rc;
use alloc::string::String;
use crate::graphics::{Image, Size};
use crate::graphics::{Image, IntSize};
use crate::window::Window;
#[cfg(feature = "std")]
@ -63,7 +63,7 @@ pub trait Backend: Send + Sync {
/// Send an user event to from another thread that should be run in the GUI event loop
fn post_event(&'static self, event: Box<dyn FnOnce() + Send>);
fn image_size(&'static self, image: &Image) -> Size;
fn image_size(&'static self, image: &Image) -> IntSize;
fn duration_since_start(&'static self) -> core::time::Duration {
#[cfg(feature = "std")]