To try the SVG package, download the demo package for your Delphi version from the demo page. If you use C++ Builder, download the C++ Builder files for the same version as well.
The demo is the full package with these limits: it is compiled for Win32 only, every rendered image gets a watermark, and it doesn’t load files from the internet.
1. Unzip
The zip holds one folder, named after your Delphi version, for example SVGDemoD13_240, with two folders inside:
Bpl: the three package files you install in the IDEDcu: the compiled units your application is built with
Put the folder somewhere permanent; the IDE keeps referring to it.
2. Remove an earlier version
If an earlier version of the packages is installed, remove it first:
- Go to Component > Install Packages…
- Select the earlier SVG packages and click Remove.
- Restart Delphi.
3. Install the packages
- Go to Component > Install Packages… and click Add…
- Add the three files from the
Bplfolder. - Check that the Palette now has an SVG2 group.
if the 64-bit IDE of Delphi 12.3 and later can’t load these 32-bit packages, add: “Delphi 12.3 and later can also run as a 64-bit IDE. Install the demo in the 32-bit IDE.
4. Add the Dcu folder to the library path
- Go to Tools > Options…
- Open the library settings:
- Delphi 11 and later: Language > Delphi > Library
- Older versions: Environment Options > Delphi Options > Library
- Under Selected Platform, choose 32-bit Windows (Windows 32-bit).
- Add the
Dcufolder to the Library path.
C++ Builder
Unzip the C++ Builder files next to the Delphi ones. They hold a Dcp and an Hpp folder. In Tools > Options… > Language > C++ > Paths and Directories, for 32-bit Windows:
- add the
Hppfolder to the Include path - add the
Dcpfolder to the Library path
[check: these C++ Builder paths follow how C++ Builder normally works and weren’t tested]
Try it
- Create a new VCL Forms Application.
- Drop a TSVG2Image from the SVG2 group on the form.
- Choose an SVG file in its FileName property.
- Run the application.
More examples are in the example projects on GitHub; they work with the demo package.
