iced-rs / iced

A cross-platform GUI library for Rust, inspired by Elm
https://iced.rs
MIT License
24.3k stars 1.13k forks source link

Draw raster images in `Canvas` #582

Open savente93 opened 3 years ago

savente93 commented 3 years ago

I've been trying to make an app that can make simple image annotations. As far as I can see Image doesn't impl Layer, meaning that I can't add it to a Canvas. This seems like a good thing to me, especially since a "paint clone" is mentioned in the Roadmap? I'm wondering how easy this would be to implement, and whether this would be the correct way to go about it, or whether there is an easier way. If it's not too complicated, I'd be willing to try and make a PR for it. Thoughts?

tinaun commented 3 years ago

I would like a Frame.draw_image(imageRect, canvasRect) function, much like the function in js's canvas

shssoichiro commented 2 years ago

Hi, I wanted to see if there was any update on this, or if someone had found a workaround for it? This is a blocker for the project I'm currently working on, where I want to render an RGB image as the base layer in a canvas, then draw annotations, grids, etc. on top of it.

hardesh commented 1 year ago

Hi, I'm also looking for this. Is there any update on this?