cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to create dynamic SVG images as it can be done with Dynamic Bitmaps ?

PJEN
Senior

The SVGImage widget is a great tool but, as I understand it can only use SVG images from the SVGdatabase.
I may imagine to subclass the SVGImage class and handle directly run time created lists of VGObject as it is done with the SVGdatabase.
What is missing is to have the imageconverter tool code to run on the embedded platform. I mean the code that convert XML SVG text files to the VGShape , commands and points like those found in SVGDatabase.cpp.
Could this code part be disclosed or a new function  like 'dynamicSVGCreate( )' be added to the lib.
This function could return a VGObject being given a text string with the SVG content ?

Or do someone have an other solution to dynamically decode SVG XML text to bitmap ?

BR

Pierre

2 REPLIES 2
Osman SOYKURT
ST Employee

Hello @PJEN ,

This sounds interesting, but we would like to know why would you need to "handle directly run time created lists of VGObject"? Do you have a use-case scenario?

Osman SOYKURT
ST Software Developer | TouchGFX
PJEN
Senior

Hello Osman,

I'm currently working on a device that displays images from a file in relation to the GPS position of the device. This device is used on off road rallyes for example. The file format is like 'openrally' (see https://github.com/openrally/openrally) . Images may be PNG but also SVG.

My intent is not to support all the SVG features. For example the 'text' objects should be converted to 'paths' if needed.

Best regards

   Pierre