Add live, interactive SVG to your Delphi application
Delphi SVG is a library for loading, rendering and manipulating SVG drawings in Delphi and FPC/Lazarus applications. A drawing is parsed into a Document Object Model, similar to a web browser. From code you can query elements by id, tag, class or attribute, change attributes and structure at run time, bind attributes to data, and determine which element is under the mouse. Output can go to a control on a form, a bitmap, a printer, PDF or EMF.
Rendering is fast enough for animation and is checked against Microsoft Edge for accuracy. The rendering layer is modular: graphics and font handling are delegated to a render context, with implementations for Direct2D, GDI+, Skia, Quartz, Graphics32 and FireMonkey. The library supports VCL, FireMonkey and Lazarus on Windows and macOS, from Delphi XE2 to Delphi 13 and FPC 3.2.2 or later.
Try the free demo · Read the documentation · Buy a license, from €149
Modular architecture
The library is organised in three layers.
Rendering. Low-level graphics work, including path drawing, font handling, glyph lookup and text shaping, is delegated to a render context. Each render context is an interface to an existing graphics library. On Windows these are Direct2D, GDI+, Graphics32 and Skia. On macOS it is Quartz, and FireMonkey and Skia are available for cross-platform applications. You select a render context at run time, so the same SVG code can produce output through different engines. The documentation lists all available render contexts and font systems.
Document model. Above the rendering layer, each drawing is held in a DOM. Changes made to the DOM appear in the next render. Because rendering is fast, you can use this for animation. SMIL and CSS animations in the file are supported, and you can also drive changes yourself, for example from a TTimer.
Components. At the top, a set of controls brings this functionality into the user interface. TSVG2Control and TSVG2Image display SVG, with properties for alignment, zooming and panning. TSVG2ImageList builds icon lists from SVG for use in your application or for export. The Bindings unit connects SVG attributes to standard Delphi controls.
Features
- Run-time DOM access. Find elements by id, tag, class or attribute, and change colours, text, visibility or document structure from code.
- Data binding. Bind SVG attributes to data, for example a valve colour to a status value, a text element to a measurement, or a seat’s fill to its booking state. You configure bindings in the Object Inspector, so you don’t need code for each element.
- Interaction. Hit-testing finds the element under the mouse, so you can handle clicks on individual parts of a drawing. Zoom and pan are built in for large drawings.
- Output. Render to a control on a form, a bitmap, a printer at the drawing’s real size, PDF, or vector EMF for use in Word, Excel, PowerPoint and report tools.
- Platforms and deployment. VCL, FireMonkey and Lazarus on Windows and macOS. The library can run in desktop applications, services, DLLs and batch processes, and it is thread-safe for parallel rendering.
- Source and extensibility. Full source code is included. New render contexts can be added through the rendering interface.
Reliability
- Browser comparison. Every file in the test set is rendered and compared with Microsoft Edge, so differences are measured and known.
- Real-world test files. The test set contains 205 files exported from 13 drawing tools, including Inkscape, Illustrator, Affinity, Figma, Visio, draw.io, LibreOffice, CorelDRAW and FreeCAD. All of them load and render.
- Development history. The library has been developed since 2015. Recent updates added data binding, zoom and pan, EMF and PDF output, printing at real size and Skia support. See the change log.
- Source availability. You can debug into the code, modify it and build on it.
Use cases
- Process and control screens: P&ID and SCADA diagrams with valves, pumps and tanks coloured from live data.
- Floor plans and layouts: rooms, seats, racks or beds that users can select, coloured from a database.
- Engineering and network diagrams: electrical, rail, utility and cable schematics that stay sharp at any zoom level.
- Documents and reports: drawings as vector graphics in Word, Excel, PowerPoint and report tools, and printed to scale.
- Labels and variable data: a single template filled with product data to produce large numbers of labels.
- Batch and server rendering: thumbnails and previews for a drawing archive, generated without a browser.
- Icons: SVG image lists for toolbars and menus that stay sharp at any display scaling.
Requirements
- Delphi XE2 up to Delphi 13, VCL and FireMonkey
- FPC 3.2.2 or later with Lazarus
- Windows; macOS with FireMonkey or Lazarus
See Supported SVG features for what the library draws, and How rendering works for the design.
Updates
The library is updated regularly. See what’s new on the downloads page and in the change log.
Questions? Email BVerhue@gmail.com.
| Made with Delphi | and FPC Lazarus | Featuring SVG xml graphics |
![]() | ![]() | ![]() |



