It is surprisingly easy to add SVG support to your applications. Here is a third party Delphi and C++ Builder component from WINSOFT that enables work with Scalable Vector Graphics files. Scalable Vector Graphics is XML-based vector image format for two-dimensional graphics.
How to install component
1) Download archive from: https://www.winsoft.sk/svgcanvas.htm
2) Extract files from archive to any folder.
3) You need to copy all files from the folder corresponding to the delphi version to the project folder. Please carefully check your delphi version and folder name because DCUs are version dependent.
4) Compile and execute demo
Example
[crayon-675016c549a15475871680/]After running you will get the resulting file with the following content:
<?xml version=“1.0“ encoding=“UTF-8“ ?> <svg xmlns=“http://www.w3.org/2000/svg“ version=“1.1“> <line x1=“50“ y1=“80“ x2=“200“ y2=“80“ stroke-width=“2“ stroke=“#FFFF00“/> <rect x=“250“ y=“50“ width=“200“ height=“70“ stroke-width=“2“ stroke=“#008000“ fill=“#70F070“/> <ellipse cx=“125“ cy=“185“ rx=“75“ ry=“35“ stroke-width=“2“ stroke=“#FF0000“ fill=“#FF7070“/> <polygon points=“250,220 450,220 350,150“ stroke-width=“2“ stroke=“#0000FF“ fill=“#7070FF“/> </svg>This component was developed by WINSOFT.
The component converts VCL canvas drawing to SVG format
This component has both versions for FireMonkey and for VCL applications to Delphi / C ++ Builder 10 – 10.4.
Works with: Delphi, C ++ Builder, RAD Server
Works on: Windows 32-bit, Windows 64-bit
Source code included in registered version. Royalty free distribution with application without any limitation.
Related links
Here is packages for VCL and Firemonkey:
SVG Canvas library
SVG Canvas library for FireMonkey
Head over and check out the full WINSOFT SVG Canvas library for VCL in Delphi and C++Builder.
Like what you see? You can get SVG Canvas Library and over 100 other fantastic WinSoft components with our Enterprise Component Pack. For a limited time, when you purchase RAD Studio Enterprise or Architect Edition at special Upgrade Pricing, you will also get this package of third-party software worth over $13,000, including the full WinSoft Component Library, at NO EXTRA COST! Step up to RAD Studio 10.4.1 today!