Allow to load an image from memory
New `image::Handle` opaque type uniquely identifying some `image::Data`, allowing reliable caching.
This commit is contained in:
parent
811d8b90d7
commit
505588d585
5 changed files with 133 additions and 33 deletions
|
|
@ -1,5 +1,5 @@
|
|||
use iced_native::{
|
||||
Background, Color, Font, HorizontalAlignment, Rectangle, Vector,
|
||||
image, Background, Color, Font, HorizontalAlignment, Rectangle, Vector,
|
||||
VerticalAlignment,
|
||||
};
|
||||
|
||||
|
|
@ -41,8 +41,8 @@ pub enum Primitive {
|
|||
},
|
||||
/// An image primitive
|
||||
Image {
|
||||
/// The path of the image
|
||||
path: String,
|
||||
/// The handle of the image
|
||||
handle: image::Handle,
|
||||
/// The bounds of the image
|
||||
bounds: Rectangle,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue