diff options
author | 2019-11-29 21:44:39 +0100 | |
---|---|---|
committer | 2019-11-29 21:44:39 +0100 | |
commit | 505588d5851fed8a3bb334edacfa6d96c545d562 (patch) | |
tree | 1fb107d7c5f9bae0b6fe0c9ff106d7b9bd483b52 /wgpu/src/primitive.rs | |
parent | 811d8b90d71c26100f0933217f5474e090fbf17c (diff) | |
download | iced-505588d5851fed8a3bb334edacfa6d96c545d562.tar.gz iced-505588d5851fed8a3bb334edacfa6d96c545d562.tar.bz2 iced-505588d5851fed8a3bb334edacfa6d96c545d562.zip |
Allow to load an image from memory
New `image::Handle` opaque type uniquely identifying some `image::Data`,
allowing reliable caching.
Diffstat (limited to 'wgpu/src/primitive.rs')
-rw-r--r-- | wgpu/src/primitive.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/wgpu/src/primitive.rs b/wgpu/src/primitive.rs index 9efd74f6..04264e5d 100644 --- a/wgpu/src/primitive.rs +++ b/wgpu/src/primitive.rs @@ -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, }, |