This ticket just some clarification about svg, and maybe more explicit api.
So backstory, I noticed svg render was empty sometimes; i then realized i was passing path with typo, and svg (presumbly) wasn't loaded, but no error.
Ideally, I handle loading raw bytes of svg once with regular file into vec<u8>, and pass this to svg api constructor. Maybe similar to #76 ?
I only see path api in svg though, unless I'm missing it? This also makes me wonder, is svg loaded from disk by iced and cached somewhere? I prefer to be in control of resource loading, so:
from_bytes (or whatever) api for handling resource loading ourselvesand thanks for great library :))))
Yes, we are currently failing silently when a file cannot be opened.
In the long run, the idea is to draw some kind of icon or error message, similar to what most browsers do. A lot of details like this are missing!
About (1), I think it could be useful indeed. Although we should also keep the current approach for convenience.
Yeah, I鈥檇 +1 being able to load SVG directly from bytes. This would be extremely useful for cases where the svg is generated in the program on the fly. Currently I鈥檇 have to save to file and reload from the known location which feels very hacky.
I just opened #247 to address this!
Please, let me know if you have any suggestions.