[Solved] Sprite from SVG

Started by RGPaul, 07 March 2023, 21:38:17



I want to draw a SVG in a Widget. I found that I can render a SVG to BackendTexture using SvgImage class.
An Sprite can only be created using a Texture, but I can't find a way to transform a BackendTexture to a Texture. Is there a way to convert the BackendTexture to a Sprite? Or can I directly draw the BackendTexture?



The SvgImage class is used internally by the Texture class. You can simply pass a filename ending with ".svg" to the Texture class just like you would load e.g. a png file.


Okay that works - thanks alot  :D