SVG images on VCL application

Hi There,

I am now adding some SVGs into a VCL application. I have an issue here that the appearance of these SVGs rendered on VCL is quite different from that on a Web application.

To demonstrate this issue, I made two demos : a VCL one and a web one. Both have same design: I put a TMSFNCImage component on the main form. I also have three SVGs inside the folder.

I imported these svgs from Bitmap -> load -> load picture dlg... Here I will make PCInfluent sipr.svg as an example. The svg is supposed to be like this:

The svg on Web demo application looks the same as above picture. However, on VCL demo, the appearance is rendered like this:

As you can see, the part on the right side is gone.

Strange behavior also happened to other two SVGs,

I also attached web and vel demos here:
VCL (1002.4 KB)

web (1.9 MB)

Any tip or advice would be helpful!

Please note that in WEB, there is out of the box SVG support in the browser and doesn't require additional libraries. In VCL, we had to write our own XML/SVG parsing library which does not yet fully support all SVG features. It's a work in progress to continue to extend and enhance support for various SVG files. Thank you for the SVG files, we'll investigate what the cause is for the drawing issues and will report back as soon as possible.

Thanks Pieter and we are looking forward to your updates on the issue.


Basically, the issue is that the SVGs created with Inkscape generally throw in a lot of unncessary garbage as well as applies transforms to the SVG paths which also makes parsing it more difficult. Simple shapes such as the ones you have sent us are overly complicated . We'll further investigate how we can fix the issue, but it's unclear if we can work our way through all the other unnecessary information.


We have optimized the SVGs and removed all unnecessary information. See optimized SVGs attached. These SVGs have been tested in VCL and now render as expected. (4.7 KB)

Hi Pieter,

Thanks for your optimized SVGs, they works quite well on our side. We are working on the rest of SVGs that need to be optimized (just as you did). Hopefully they all work as we expect and will let you know then.

Again, thanks for your support for this!


1 Like