I am trying to load a SVG image in a VCL TImage at Runtime.
AdvType is added to the Uses list.
I call Image.Picture.LoadFromFile(mySvgFile); as explained on blog:
By default the Image is not visible. If I set proportionnal to True on TImage, I can see my image but very small. It seems my SVG is not scaled to the TImage size.
I did not find samples or documentation regarding this.
This means that the SVG file you are loading initially has a small view port size. You can turn on the stretch property to stretch the SVG file to match the size of the image.
If I turn off "proportionnal" and "stretch": the image is not displayed (or too small ???)
If I turn on "proportionnal" on TImage: the image is displayed, small but! proportionnal.
If I turn on "stretch" on TImage: the image is displayed, small and deformed.
The viewport is 100x100 millimeter, not pixels. you can remove the viewport to fix the issue, we'll look into adding support for viewports in millimeters.