4D SVG is a component that takes advantage of 4D v11 SQL's native SVG engine, allowing you to create and manipulate SVG graphics within your 4D applications. With it, you can create, transform, and even animate SVG images, bringing even more versatility to your 4D v11 SQL solutions.
The component provides commands to meet your most frequent graphical needs, giving you access to parameters that will let you create your own SVG graphics, or modify existing SVG files from other sources.
It includes an SVG Viewer that will let you view your SVG files both as an image and as the XML source code. A separate Syntax Palette lists all of the component's commands - logically grouped by theme - which can be dragged and dropped into your 4D methods, along with all of their parameters.
Additionally, 4D SVG includes its own 4D Pop component that gives you access to the functions via the 4D Pop toolbar.
An exhaustive list of the parameters and commands is available in the 4D SVG documentation, included with the component.
Why use SVG?
Besides being a widely-supported standard, vector graphics can bring tangible benefits to 4D developers.
Lighter: In many cases, vector graphics are more lightweight than bitmap graphics. A simple button or shape can be measured in hundreds of bytes, rather than many kilobytes.
More scalable: The same vector image file can be scaled to any size – as many times as desired – without loss of quality, and without any increase in data size.
Programmatic control: Because SVG files are based on XML, you can manipulate everything from the size to the actual shape and composition of your images programmatically. Text – for example on buttons – can be modified repeatedly without having to generate new graphic files.