revery-ui / revery

:zap: Native, high-performance, cross-platform desktop apps - built with Reason!
https://www.outrunlabs.com/revery/
MIT License
8.07k stars 197 forks source link

experiment: Update runtime SVG example #1060

Closed bryphe closed 3 years ago

bryphe commented 3 years ago

Experiment to update the SVG example to use the new SkSVGDOM API that @zbaylin implemented in #1058

Unfortunately - it's not quite working to render the SVG.

If the SVG is invalid, it crashes (likely due to a null return we don't handle in the FFI at the moment), and if it is valid, it loads and returns a width/height, but is empty:

image

Maybe something obvious I'm missing?

Also - we'll be able to completely remove our manual implementation of the Revery_SVG module here: https://github.com/revery-ui/revery/tree/master/src/SVG with #1058

bryphe commented 3 years ago

Updated - working now with the layout of the canvas fixed

zbaylin commented 3 years ago

This should be made obsolete by #1061 (I think)

bryphe commented 3 years ago

For sure - thanks @zbaylin !