iced icon indicating copy to clipboard operation
iced copied to clipboard

render svg into graphics canvas

Open aentity opened this issue 3 years ago • 3 comments

Hi i want to render svg i have into graphics canvas, is it possible?

For example, i use graphics to draw things, but occasionally i want to draw/render an svg to somewhere in this canvas.

I can't see how to do it, is there help or example for such thing? or do we need new api?

aentity avatar May 15 '21 17:05 aentity

Just wondering if there's any progress on this or a solution on how to do it in iced currently?

xd009642 avatar Oct 30 '23 21:10 xd009642

Also came up for me recently. I'll give the change in the referenced #881 a try. For example I have a little chess-related app and want to draw a chessboard and then place chess piece SVGs on top of the board. Also related, issue #30; if that were implemented maybe I wouldn't care as much, although I will mention that svg support seems very much in the spirit of a canvas object. Things to prevent the user from having to draw everything manually.

aquirdTurtle avatar Dec 27 '23 19:12 aquirdTurtle

@aquirdTurtle what a coincidence a chess-related app is what I'm working on. If you want something that practically works I've had the most luck with Tauri and leaning on JS for the UI via react-chessboard. I say most luck because the javascript/rust workflow isn't the most ergonomic but at least the javascript ecosystem has a lot more hands working on it

xd009642 avatar Dec 27 '23 21:12 xd009642