Introduce first-class image module in iced_native

This commit is contained in:
Héctor Ramón Jiménez 2021-10-31 16:20:50 +07:00
parent b3a01973c6
commit c4186a71b7
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
12 changed files with 139 additions and 143 deletions

View file

@ -302,10 +302,7 @@ impl backend::Text for Backend {
#[cfg(feature = "image_rs")]
impl backend::Image for Backend {
fn dimensions(
&self,
handle: &iced_native::widget::image::Handle,
) -> (u32, u32) {
fn dimensions(&self, handle: &iced_native::image::Handle) -> (u32, u32) {
self.image_pipeline.dimensions(handle)
}
}

View file

@ -17,7 +17,7 @@ use std::mem;
use bytemuck::{Pod, Zeroable};
#[cfg(feature = "image_rs")]
use iced_native::widget::image;
use iced_native::image;
#[cfg(feature = "svg")]
use iced_native::widget::svg;

View file

@ -1,5 +1,5 @@
use crate::image::atlas::{self, Atlas};
use iced_native::widget::image;
use iced_native::image;
use std::collections::{HashMap, HashSet};
use bitflags::bitflags;