summaryrefslogtreecommitdiffstats
path: root/graphics/src/backend.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-11-05 03:13:04 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-11-05 03:19:38 +0100
commit8ce8d374b1e8d1d394a42a5ee2bca8af790f0b71 (patch)
tree40cf3587e2a08f845c9a8d89108b1b3d8cd86213 /graphics/src/backend.rs
parent5575e6ea0897e406674e7e4239808fbf9daa07c3 (diff)
downloadiced-8ce8d374b1e8d1d394a42a5ee2bca8af790f0b71.tar.gz
iced-8ce8d374b1e8d1d394a42a5ee2bca8af790f0b71.tar.bz2
iced-8ce8d374b1e8d1d394a42a5ee2bca8af790f0b71.zip
Refactor some `image` traits a bit
- Use `Size<u32>` were applicable. - Rename `TextureStore` to `image::Storage`. - Rename `TextureStoreEntry` to `image::storage::Entry`. - Wire up `viewport_dimensions` to `iced_glow` for `Svg`.
Diffstat (limited to 'graphics/src/backend.rs')
-rw-r--r--graphics/src/backend.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/graphics/src/backend.rs b/graphics/src/backend.rs
index 7e0af2cc..2f8e9fc3 100644
--- a/graphics/src/backend.rs
+++ b/graphics/src/backend.rs
@@ -66,11 +66,11 @@ pub trait Text {
/// A graphics backend that supports image rendering.
pub trait Image {
/// Returns the dimensions of the provided image.
- fn dimensions(&self, handle: &image::Handle) -> (u32, u32);
+ fn dimensions(&self, handle: &image::Handle) -> Size<u32>;
}
/// A graphics backend that supports SVG rendering.
pub trait Svg {
/// Returns the viewport dimensions of the provided SVG.
- fn viewport_dimensions(&self, handle: &svg::Handle) -> (u32, u32);
+ fn viewport_dimensions(&self, handle: &svg::Handle) -> Size<u32>;
}