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
|
|
@ -229,9 +229,9 @@ impl Renderer {
|
|||
border_radius: *border_radius as f32,
|
||||
});
|
||||
}
|
||||
Primitive::Image { path, bounds } => {
|
||||
Primitive::Image { handle, bounds } => {
|
||||
layer.images.push(Image {
|
||||
path: path.clone(),
|
||||
handle: handle.clone(),
|
||||
position: [bounds.x, bounds.y],
|
||||
scale: [bounds.width, bounds.height],
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue