diff options
author | 2022-11-05 04:37:59 +0100 | |
---|---|---|
committer | 2022-11-05 04:37:59 +0100 | |
commit | 370fa14efb8d41bcf81e4a0ead6a9ab7ab750bee (patch) | |
tree | 6a434e6bc8c3a95065faafa533cf1d5e2318cc06 /wgpu/src/image/atlas/entry.rs | |
parent | 7b129917281baaa6688158c303922f94341ab69f (diff) | |
parent | 078cadfed0e67560d9047d84435e87b8671c5992 (diff) | |
download | iced-370fa14efb8d41bcf81e4a0ead6a9ab7ab750bee.tar.gz iced-370fa14efb8d41bcf81e4a0ead6a9ab7ab750bee.tar.bz2 iced-370fa14efb8d41bcf81e4a0ead6a9ab7ab750bee.zip |
Merge pull request #1485 from ids1024/glow-image
Glow image rendering support; move image/svg code to iced_graphics
Diffstat (limited to 'wgpu/src/image/atlas/entry.rs')
-rw-r--r-- | wgpu/src/image/atlas/entry.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/wgpu/src/image/atlas/entry.rs b/wgpu/src/image/atlas/entry.rs index 9b3f16df..69c05a50 100644 --- a/wgpu/src/image/atlas/entry.rs +++ b/wgpu/src/image/atlas/entry.rs @@ -1,17 +1,19 @@ use crate::image::atlas; +use iced_graphics::image; +use iced_graphics::Size; + #[derive(Debug)] pub enum Entry { Contiguous(atlas::Allocation), Fragmented { - size: (u32, u32), + size: Size<u32>, fragments: Vec<Fragment>, }, } -impl Entry { - #[cfg(feature = "image_rs")] - pub fn size(&self) -> (u32, u32) { +impl image::storage::Entry for Entry { + fn size(&self) -> Size<u32> { match self { Entry::Contiguous(allocation) => allocation.size(), Entry::Fragmented { size, .. } => *size, |