Change log

Version 2.4 udate 20, 9-11-2023

Added package files for Delphi 12.

Version 2.4 update 19, 1-4-2023


  • Added class method ClassRegisterDocBinding to TSVGXMLDocument to enable registering element classes before the TSVGXMLDocument object creation.


  • The pattern tile is increased with one pixel to decrease the chance on seams. This can be enabled/disabled with define “SvgPatternCorrectSeams”


  • Fixed an “out of range” bug and some other issues in Bidi text and direction processing
  • Made a change to “text to path” functionality, the original id of the converted text elements is transferred to the resulting g elements, previously this was set to id=”text”.
  • Fixed a bug in BVE.SVG2GeomUtility function PtOnPoly, causing textPath on multiple paths not to continue on the next path
  • Fixed a bug which caused invalid dy calculations on textPaths
  • Fixed a typo in ISVGGlyphRun.Addvances -> Advances


  • Fixed a bug in BVE.SVG2PathData function TSVGPathStringParser.ParseDrawToCommands, shorthand/smooth quadratic bezier path parsing (t, T) was not correct.


  • Fixed a bug which caused errors in css parsing if comment elements <!– … –> where embedded in the css.
  • Fixed a bug in css pseudo-class “nth-child”, elements are 1 based, not 0 based.
  • Added css pseudo classes nth-of-type, first-of-type, last-of-type.
  • Fixed a bug in CSS animation in which animation properties did not cascade.
  • Fixed a bug in CSS animation which caused incorrect animation if the keyframe rules where not defined in increasing order in the stylesheet.


  • Changed the way that ColorSpace and Premultiplied conversions on intermediate buffers are applied, this fixes a number of color and gamma errors.
  • Fixed a bug unit in BVE.SVG2Elements, procedure TSVGObject.PaintBufferIntermediateAndApply which resulted in incorrect filter rendering in some cases.
  • Fixed a bug in TSVGContextD2d3D11.FilterComponentTransfer resulting in Linear and Gamma functions not working.
  • Fixed a bug in TSVGContextD2d3D11.FilterBlend, TSVGContextD2d3D11.FilterComposite, TSVGContextD2d3D11.FilterDisplacementMap which could result in a wrong translation before applying the effect.

DLL and Multi threading

  • Fixed a bug which caused FinilizeGraphics not being called if render context SVGDirect2d3D11 is used in a DLL.

Version 2.2 update 15, 12-10-2022

Changed FreeAndNil(<interface var>) into <interface var> := nil

Changed Type ExtendMode from Integer to D2D1_EXTEND_MODE (in case of compiler version 350 and up = D11)

Changed all enumerations, for example Brush = TBrushKind.bkSolid to TBrushKind.Solid in case of compiler version 350 and up (mostly in FMX).

Version 2.4 update 18, 22-12-2021

Fixed a bug in BVE.SVG2Elements.pas, procedure TSVGText.SelectGlyphs, which could cause an “Out of range” exception if bidi control characters are present in text.

Fixed a number of bugs in the TSVG2ImageList “Entity” functionality and image list designer.

Added classes TSVGRenderContextFactory and TSVGFontSystemFactory to units BVE.SVG2Elements.VCL, BVE.SVG2Elements.FMX and BVE.SVG2Elements.FPC for more control on how and when the OS dependent render context types and and font system types are selected.

Added code to the TSVGRenderContextManager to check if the WIC render context is supported.

Version 2.4 update 17, 12-11-2021

Fixed function TSVGPaint.GetAsString: TSVGUnicodeString; in BVE.SVG2Types.pas, for converting the record back to text.

Fixed function function ColorToCSSColor(Value: TColor): string; in BVE.SVG2Elements.VCL.pas, alpha component should be the last digits.

Fixed a bug in unit SVG2.Elements.pas procedure TSVGXMLDocument.ElementRegister and procedure TSVGXMLDocument.ElementUnregister, the wrong element could be registered or unregistered if there are multiple elements with the same id attribute.

Fixed a bug in XMLImportNode in unit BVE.SVG2Dom, which caused new elements with an id attribute not to be registered in the SVG document ElementIndex.

Version 2.4 update 16, 26-10-2021

Fixed a bug in BVE.SVG2Control.FPC.pas, SVG renderings were not correctly displayed on a high retina display on MacOS.

Fixed a bug in TSVG2BaseView, unit BVE.SVG2Doc.pas, which caused mousepointer positions for SVG controls not to be calculated correctly if the monitor scaling is greater then 100%.

Fixed a bug in BVE.SVG2Elements.pas, TSVGPathShape, empty paths are now excluded from size calculations and mousepointer calculations.

Fixed a bug in PathData “ApplyMatrix”, the matrix was not applied to the variables FFirstpoint and FLastPoint in the root class.

Added a workaround for GDI+ GraphicPath.GetBounds, which returns (0,0,0,0) for path M20,20 L20,20. This should be (20,20,20,20).

Version 2.4 update 15, 23-9-2021

Fixed a bug in TSVGFormatter: CData element was not parsed

Fixed a bug in TSVGXMLReader.ParseCData: element closure “]>” was not consumed

Fixed a bug in TSVGXMLReader.ReadExtraBuffer: buffer length was overwritten on Freepascal

Fixed a bug in BVE.SVG2ContextFMX.pas”: TTextAlign.taLeading was not changed in TTextAlign.Leading for D11

Fixed a bug in BVE.SVG2ContextQuartz, datatype Single needed to be changed to CGFloat, which caused gradients not to be rendered on MacOS64

Added method IsScaled to TSVG2BaseImageList for D11, for HDPMI compatibility

Added TSVGContextQuartzPrintJob for render context Quartz (MacOS)

Made a global for the standard internal DPI: SVG_StdDPI in BVE.SVGTypes

Version 2.4 update 14, 11-9-2021

Fixed a bug in BVE.SVG2Doc.pas, procedure TSVG2CustomAnimationTimer.CalcFPS; that caused an arithmatic overflow in certain conditions.

Added project files for Delphi 11 Alexandria

Removed version 2.3 from the source code zip file. If you need older versions of the package, you can send me an request by mail.

Version 2.4 update 13, 31-8-2021

Fixed a bug in BVE.SVG2FontCoreText.pas that caused SVG fonts not to be rendered on MacOS and iOs.

Fixed a bug in BVE.SVG2Elements.FPC.pas that caused a compilation error on TSVGRenderContextManager.CreatePrintJob on FPC for MacOS.

Made some optimizations in Filter convolve algorithm.

Added missing code in BVE.SVG2ContextGP.pas for assigning and copying GDI+ pathdata.

Added a check and work around in BVE.SVG2FontGDI.pas in case glyphs are missing for a particular font.

Version 2.4 update 12, 7-7-2021

Fixed a bug in BVE.SVG2Graphic.VCL: after calling TSVG2Graphic.LoadFromFile or TSVG2Graphic.LoadFromStream the SVG document was not automatically parsed on rendering, resulting in a blank image.

Version 2.4 update 11, 3-7-2021

Fixed a bug in BVE.SVG2Elements.FPC TSVGRenderContextManager.CreatePrintJob: added missing parameters.

Fixed a bug that caused printer settings not being applied if printing with GDI+ render context.

Fixed a bug in the text rendering algorithm: the delta x or y of a character was ignored if an absolute x or y was also defined for the character.

Fixed a bug BVE.SVG2FontGDI.pas that caused incorrect placement of glyphs in case of very small font sizes.

Fixed a bug in calculating text positions in case of TSVGTextFormattingOption is tfoStringsWithPlacedCharacters.

Fixed a bug that caused a gradient not to be applied correctly over multi line text in case of Direct2D.

Added class function “Capabilities: TSVGRenderContextCapabilities;” to render context classes, for interrogating the capabilities of a render context.

Added class TBitmapCodecSVG to unit BVE.SVG2Elements.FMX. This is a bitmap codec for loading SVG files.

Added functionality to BVE.SVG2ContextGP.pas and BVE.SVG2FontGDI.pas for improved font selection when rendering text with GDI+.

Version 2.4 update 10, 7-6-2021

Fixed a bug in unit BVE.SVG2ContextD2D procedure TSVGPathDataD2D.AddPathData(const aPathData: ISVGPathData; const aMatrix: TSVGMatrix); which caused the existing pathdata to be discarded.

Fixed a bug in unit BVE.SVG2PathData which resulted in FPointCount and FLastPoint not being updated after a call to AddPathData

Fixed a bug which caused the renderer not updating the object cache after setting an attribute with TSVGElement.SetAttribute, solved by calling ObjectCacheInvalidate.

Added procedure ObjectCacheInvalidate(aParentCache: ISVGObjectCache); to ISVGObject, this decreases the object cache version and of its children, so the cache will be updated on the next render

Added procedure SetPathDataList(aRoot: ISVGRoot; const aValue: ISVGPathDataList); to ISVGPathShape to directly set de pathdata

Registered PidOSX64 on FMX components from DX10.1 Berlin onwards

Version 2.4 update 9, 18-4-2021

Added a member “property Data: Pointer” to TSVGElement (ISVGELement) to link application-defined data

Added function “PointInStroke” to TSVGRectangle, TSVGCircle, TSVGEllipse

Added Event “OnRenderSVGObject(const Value: TProcRenderSVGObject);” on TSVGRoot, this is called when an element is about to be rendered.

Added members “function Invalidated(const aBounds: TSVGRect): Boolean;” “procedure InvalidateRect(const aRect: TSVGRect);” and “property UpdateRectList: TList read GetUpdateRectList;” to TSVGRoot. These can be used to restrict rendering to the supplied rectangles for efficiency.

Added “rsCalcCache” to the TSVGRenderMode. When this is included in the TSVGRoot.RenderMode then only the element cache will be recalculated, no actual painting will take place.

Fixed a bug which caused TSVGPathData.Count to be inconsistent. It will now return the TSVGPathPoint count, including M and Z.

Fixed a bug in TSVGPathDataD2D.AddPathData which caused figures not be closed if open and closed figures where both present in a geometry

Fixed a bug which caused animated elements not being updated if sroPersistentBuffers was included in the TSVGRoot.RenderOptions.

Fixed a bug in BVS.SVGDOM.pas in setAttributeNodeNS and setAttributeNS function tryFindNamedItemNS was called width a qualified name instead of a local name.

Fixed a bug in TSVGPathData that could cause an access violation, because the FPolygonList was not assigned

Fixed a bug in the adaptive delay in TSVG2CustomAnimationTimer.CalcInterval that caused animations to run unstable

Fixed a bug in SVG2ImageListEditor.FMX.pas which caused item selection in lists present in the FMX SVG image list component editor not to function as expected.

Fixed a bug in SVG2ImageListEditor.FMX.pas which caused updates in the StyleStringValues control in the FMX SVG image list component editor not to function as expected.

Version 2.4 update 8 amendment, 24-3-2021

Fixed a bug in which DpiY and height parameters where swapped in TSVGContextD2dPrintJob.BeginPage

Forgot to enable {$Define SVG_2} in, which will cause transform parameter in css to be disabled

Version 2.4 update 8, 21-3-2021

Added support for custom font collections (for text layouts GDI and DirectWrite)

Added support for rendering to (PDF) printer (for render contexts GDI+ and Direct2D and FMX canvas)

Added support for rendering text through the render context (for outputting text in stead of only glyph contours to PDF documents)

Added support for rendering to command lists (GDI+ EMF metafile and Direct2D command list) and drawing command lists

Added events for loading external and embedded resources

Added classes TSVGParserThread, TSVGParserQueue in unit BVE.SVG2SaxParser.pas for parsing SVG in a threads

Added classes TSVGRenderThread, TSVGRenderQueue in unit BVE.SVG2Elements.pas for rendering SVG’s in a threads

Added ESvgRcException, ESvgRcD2dException, ESvgRcGPException to enable intercepting render context (resp. Direct2D, GDI+) exceptions

Removed minimize buttons from TSVG2ImageList component editor dialog

Fixed a bug with selecting the first SVG in the TSVG2ImageList FMX component editor

Added function to save the source SVG’s from the TSVG2ImageList FMX component editor

Fixed a bug in the TSVGPathDataIteratorGP object, which missed a “close” command in some cases

Fixed a bug which caused indent spaces to be included in text, when saving XML document to file

Fixed a bug that if an attribute value was invalid, it was not ignored

Fixed a bug that when an element was removed from a document, it’s childerd where not unregisterd from the document, which could cause an access violation.

Version 2.4 update 7, 9-2-2021

Added options for rendering text in EMF files, see documentation and RenderToEMF example.

Added property “HideDesignRect” in the SVG controls, see documentation.

Added an optimization that if a clipPath is a simple axis aligned rectangle, this will be rendered as a simple cliprect, in stead of creating an alpha bitmap buffer.

Added property “FontFaceList” on the “ICSSStyleSheet” interface, so it is possible to iterate through the font faces defined in a cascading style sheet.

Fixed a bug on TSVG2ImageList that prevented re-render of images to match monitor scale on loading of the component.

Fixed a bugs in the GDI text layout, that prevented the correct font face being selected.

Fixed a bug that caused SVG fonts defined in a style sheet not being selected.

Version 2.4 update 6, 16-1-2021

Fixed a bug parsing CData element in BVE.SVG2XMLReader. This bug resulted in the first character of the data not being read.

Added a compiler switch “SvgCtrlExceptionsOff” in If enabled than the exception that is raised if you try to load a non-existing SVG file in one of the SVG controls, will be suppressed and the error will be displayed in the SVG control window in stead. This switch is enabled by default.

Version 2.4 update 5, 3-1-2021

Fixed a bug in TSVG2ImageList, style names where not saved.

Fixed a bug in TSVG2ImageList, custom style svg definition was not saved.

Fixed a bug in TSVG2ImageList for Fmx, if a style was deleted the images disappeared from the grid of the designer.

Fixed a bug which caused an exception if a text child has attribute display=”none” defined.

Added a check that entity names are valid in BVE.SVG2XMLReader.

Added a check that attribute names are preceded with a space in BVE.SVG2XMLReader.

Version 2.4 update 4, 13-12-2020

Fixed bug, when used in a dll, Direct2D or GDI+ must be initialized/finalized
explicitly. However, a bug prevented Direct2D to be finalized correctly which
resulted in the dll not to being unloaded.

Fixed bug, animations in TSVG2Control and TSVG2Image did not start automatically.
only when rendered first, before the animation timer was started.

Fixed bug, sometimes, on closing the application, the SVG controls are not
correctly unregistered from the animation timer which caused an exception.

Version 2.4 update 3, 28-10-2020

Fixed bug, compilation error if render context GDI+ (SVGGDIP) was selected

Changed parameter aPt in VCL “ObjectAtPt” function from TPointF to TSVGPoint

Version 2.3 and 2.4 21-10-2020

Fixed bug, compiler error in BVE.DX.DXGI.pas if compiled with “emit runtime type information” enabled

Version 2.2, 2.3 and 2.4 21-10-2020

Fixed bug, arc segments with very large radius where not rendered correct on Direct2D

Version 2.4 16-10-2020

Added SVG/SMIL and CSS animation

Added new control TSVG2DirectXControl for VCL, enabling smooth GPU enabled animation

Added support for different XML vendor implementations

Added functionality TextToPath

Disabled range checking in SaveBitmapAsPng procedure in SVG2Elements.VCL

Version 2.3 update 11, 17-10-2020

Fixed problem with compiling in Delphi 10.4 update 1, TCall members made public in BVE.SVG2Types

Version 2.3 update 10, 12-10-2020

Fixed a bug in parsing the end parenthesis of “matrix(…)” in the “transform” attribute which could cause wrong transformation calculations in certain SVG images.

Version 2.3 update 9, 30-9-2020

Enabled reordering of SVG’s in TSVG2ImageList

Changed order of “Ok” and “Cancel” knobs on designer of TSVG2ImageList

Added a component editor to the SVG controls for loading large SVG file and added compression when SVG files are stored in the form file.

Fixed bug: “Scaled” property was not copied on assign of TSVG2ImageList

Fixed bug: Connected TSVG2LinkedImageLists are not rebuild after assign of TSVG2ImageList

Fixed bug: On FMX the element bounds were not calculated correctly, which caused mousepointer events not being fired.

Fixed bug: When Direct2D and GDI+ render contexts are both enabled, this causes an error when Direct2D is not available on the system. Fixed this by adding “delayed” to the external function declarations.

Fixed some bugs in the rendering procedures.

Version 2.3 update 8, 16-9-2020

Fixed a new bug, introduced in update 7, for positioning the filter source background buffer

Version 2.3 update 7, 12-9-2020

Fixed a bug calculating position of the filter source buffer and filter background buffer.

Fixed a problem in function “PNG4TransparentBitMap” that caused compilation errors if compiling with range checking enabled.

Added default font names for Android in unit BVE.SVG2Types.

Fixed a bug that caused incorrect mousepointer location calculations.

Version 2.3 update 6, 27-5-2020

Added packages en files for Delphi 10.4 Sydney.

Version 2.3 update 5, 7-3-2020

Added the Aggpas rendercontext option to FPC/Freepascal. If CWBudde/AggPasMod does not compile, try the forked version BVerhue/AggPasMod.

Fixed a SVG control sizing problem in the FPC/Lazarus SVGViewer application

Version 2.3 update 4, 22-2-2020


In this update the SVG components and controls are upgraded. This means that some properties are added or deleted or changed, which will give warnings when you update the SVG control packages and then open your project in the Delphi or Lazarus IDE. You should therefore make a backup of your application source including your previous version of the SVG package before upgrading.

In principle all warnings about changed properties should be accepted. When you have used the FMX (Firemonkey) version of the TSVG2ImageList from version XE8 onwards, the SVG info will be lost and you have to import the SVG’s again after upgrading. The TSVG2ImageList for VCL and FPC/Lazarus will give warnings but will be o.k. if you accept all warnings.

Other changes:

Fixed an error in the TSVGBaseBitmap.CopyFrom method. The destination rectangle was not calculated correctly which resulted in an incomplete copy.

Fixed a problem in font selection. Sometimes text was not displayed because the font was not found locally on the system. Now more fall back fonts are defined for Windows, OsX and Linus platforms.

Fixed an error in the lighting filters which caused an exception on freeing the root.

Fixed an error in the box-blur algorithm that could cause an exception.

Version 2.3 update 3, 8-12-2019

Fixed problem with embedded raster graphics if the type (png, bmp etc.) is not explicitly mentioned in the mime type. The package will attempt to determine the type from the raw data.

Fixed a problem with temporary bitmaps of zero size in Direct2D and Aggpas render context which threw exception errors.

Fixed an error with anchoring text on a path.

Fixed an error with calculating the source graphic rectangle for SVG graphics with filters.

Fixed an error with calculating the bounding rectangle for non outer SVG elements.

Version 2.3 update 2, 31-10-2019

– Fixed error “Object state out of sync”. This happened if the DOM structure state changed between rendering. The fix is that the ObjectStateTree is invalidated (ObjectStateInvalid = TRUE) if an element is added or deleted or a href attribute is changed. ObjectStateInvalid = TRUE will cause a rebuild of the ObjectStateTree on the next rendering if sroEvents is included in the options.

– Fixed error with DPI scaling for render context Direct2D and GDI+. If the monitor is set on a higher DPI scale before the applications was started the SVG image was rendered too big. Reason was an incorrect DPI setting for these render contexts which caused a doubling of the scale.

– Fixed an cause for a compiler error in XE2 (URW1147 caused by a call to Finalyze on a TBytes object) in BVE.SVG2FontGDI.pas

Version 2.3 update 1, 21-9-2019

Fixed an issue with thread safety on FPC/Lazarus
Fixed some issues with font selection
Fixed an issue with placing glyphs on a path
Fixed an issue with rendering png files on Quartz, the target needed to be cleared first.

Version 2.3, 9-9-2019

Added support for FPC/Lazarus, supported platforms are now:
– Delphi VCL
– Delphi FMX
– Freepascal with Lazarus

Changes to render contexts (RC’s):

Added RC Quartz
– for Delphi FMX only
– Limitations:
– Spread method on gradients not supported

Added RC BGRABitmap
– for FPC/Lazarus only
– Limitations:
– Spread method on gradients not supported

Added RC Direct2D (3D11) (DirectX version 11) to existing Direct2D (WIC)
– for Delphi VCL, Delphi FMX, FPC/Lazarus
– Hardware acceleration (3D11)

Updated RC Windows GDI+
– For Delphi VCL, FMX
– Limitations
– Radial gradient is not rendered correctly

Added RC Graphics32
– For Delphi VCL, FPC/Lazarus

Updated RC Aggpas
– For Delphi VCL, FMX

Separated RenderContext’s and text rendering. For text rendering of system fonts and SVG fonts the following interfaces are added:

– for Windows

– for legacy Windows

– for Mac, iOS

– for Windows, Mac, Linux (freetype.dll needs to be installed)

– Full rewrite of the SVG library:

Based all element and attribute interfaces on IXMLNode.
Integrated the SVG parser so it can be used to build the DOM but also extend/change the DOM after building or set attributes.
Replaced the text rendering algorithm, added support for bidirectional text, text-decoration for SVG fonts and system fonts for RC that support BIDI.

property “DownSampleFactor” was removed from the FMX controls.

Changed the license to subscription.

– There is a one time fee on purchase of a license and a yearly fee for upgrades and support.
– Owners of a v2.2 license can upgrade to v2.3 and only need to pay the subscription fee.

Version 2.2 update 13, 8-12-2018

Fixed bug, TSVG2ImageList.VCL ClearColor attribute was lost after closing/loading project

Fixed bug, BeginUpdate/EndUpdate didn’t work propertly in TSVG2ImageList.VCL

Fixed bug, XML Reader Eval function failed if close to buffer end

Created project files and package files for Delphi DX3 Rio

Improved functionality for finding SVG elements by coordinates, for SVG mouse events and ObjectAt function.

Added ChangeScale overrides to VCL SVG controls for support of DPI and monitor scale settings

Added High DPI support to the viewer demo application for VCL for DX (Seattle) and higher

Created a new viewer demo application for FMX for XE8 and higher

Removed the SVGBrowser and SVGToRaster demo apps

Version 2.2 update 12, 1-8-2018

Fixed typo in TSVGMask assign

Fixed bug, group opacity was not applied on use elements

Fixed bug, if illegal char in path, parser should finish the path without error messages.

New license terms for licenses bought after 1-8-2018

Version 2.2 update 11, 24-6-2018

Added “AspectRatioAlign” and “AspectRatioMeetOrSlice” properties on the SVG controls. Together with the “AuotViewbox” property these control the aspect ratio of the SVG graphic within the control.

Added support for the “fill-rule” and “clip-rule” presentational attributes. This is supported by Direct2D and Aggpas render contexts, but not by the FMX render context and the GDi+ render context.

Added support for decimal and hexadecimal entity parsing in BVE.SVG2XMLReader.pas

Added support for downloading external resources from internet, this must be enabled by define “InternetAccess” in

Improved parsing speed of path elements with about 30%

Changed implementation of ISVGRenderBuffer for improved support for bitmap operations on rotated elements

Changed bitmap buffers for BVE.SVG2Control.FMX.pas, BVE.SVG2Image.FMX.pas to support screen scale other than 1 (iOS)

Changed behaviour of unsupported float values (null) of element parameters in BVE.SVG2SaxParser.pas and BVE.SVG2PathData.pas, in case of an unsupported value the default value of the attribute will be used.

Fixes a bug on the FMX controls, opacity property was broken

Fixed a bug in SVGControl (VCL and FMX) that caused an access violation if the bitmap buffer is zero size due to clipping.

Fixed a bug “bus error” on Android, caused by “packed” directive on the TSVGPathPoint record

Fixed a bug which could cause an access violation on the specular light filter, because of bitmap buffer size mismatch

Fixed a bug which could cause clipPaths not being rendered correctly in case of nested clipPaths

Fixed a bug which caused opacity attribute not being rendered correctly on gradients by Aggpas render context.

Version 2.2 update 10, 4-4-2018

Fixed bug: Internal search on element id was case-insensitive.

Fixed bug: Opacity was applied double on radial and linear gradient in the render context implementation for Direct2D

Fixed bug: Temporary bitmap buffers where not always pixel aligned with target bitmap, which resulted in color shift on edges of for example clippath.

Version 2.2 update 9, 30-1-2018

Fixed a bug that could lead to parsing errors if the US decimal point format settings are changed on the user’s pc.

Fixed a bug in the TSVG2ImageList which led to small artefacts being visible in the rendered images of the image list. The problem was that the bitmaps where added premultiplied to the list, they should first be unpremultiplied.

Added parameter “PreserveContentBitmap” to the SVGRenderToBitmap function in unit BVE.SVG2Elements.VCL. If set to TRUE, the bitmap will not be cleared (with alpha black = $00000000), but the SVG graphic will be drawn on top of the existing bitmap content. This parameter is set to a default value of FALSE.
The TSVG2ImageList object will initialize a bitmap with the clear colour and then call this function with the parameter set to TRUE, so the clear colour is preserved.

Version 2.2 update 8, 6-12-2017

Fixed bug in sax parser, first node is not cleared from NodeStack, which resulted in big memory consumption on repeated parsing (random star example)

Fixed bug in triggering text event, bug in character cell bounds calculation

Fixed a bug, introduced in Update 7, if windows system DPI is changed, the SVG rendering scale was not correct.

On some Windows systems the Direct2D DC rendering does not work, resulting in black bitmaps. I replaced the DC rendering target with a WIC rendering target, which was already used but only for intermediate buffers.

Fixed a bug, if an Base64 encoded embedded SVG image contains Linefeed characters (#10), this would result in a image decoding error. This is solved by adding #10 to the entity list of the XML reader in BVE.SVG2XMLReader.pas

Added support for complex font-face-src CSS definitions and SVG elements. This now supports multiple sources and the “local” directive.

Removed some unused code in BVE.RenderContextDirect2D.VCL.pas

Version 2.2 update 7, 20-11-2017

Fixed bug parsing CSS sheet id name and class name

Fixed access violation on rendering text with GDI

Added example RenderToEMF

Version 2.2 update 6, 7-11-2017

Fixed bug in parsing “Transform” attribute, comma seperator was ignored

Fixed bug in path “t”,”T” and “s”, “S” commands

Version 2.2 update 5, 10-6-2017

Restructured detection of encoding in BVE.SVG2XMLReader.pas, this solves issues reading UTF-16 encoded xml files with BOM

Fixed a bug in TSVG2Graphic which resulted in bitmap not cleared with transparent before rendering

Version 2.2 update 4, 7-6-2017

Fixed memory leak in BVE.SVG2XMLReader.pas, in case of BOM reading

Disabled a debugging line that was forgotten in BVE.SVG2ImageList.VCL.pas (clear bitmap with blue color)

Version 2.2 update 3, 4-5-2017

Solved a bug parsing comments in CSS

Solved a bug parsing Unicode references in glyph definitions

Added CalcIntrinsicSize to TSVGRoot to calculate the initial size of an SVG in pixels, also if it it’s size is given in percentages or not defined at all. In controls this will now be called through the “CalcSize” procedure.

Fixed a bug in TSVG2Graphic Draw procedure placing the bitmap origin

Version 2.2 update 2, 9-4-2017

Support for iso-8859-1 encoded xml files.

Fixed missing unit in XE5 and DX2 Raster demo project files

Version 2.2 update 1, 1-4-2017

Lighting-color sRGB to Linear conversion

Morphology filter output set to premultiplied

Displacement filter, if in = in2 a temporary copy of the in2 buffer is made because in2 should not be premultiplied

Version 2.2, 24-3-2017

Biggest changes are:

  • Added SVG filter effects functionality
  • Added SVG events functionality
  • Added a ISVGRenderContext implementation for the AggPas rasterizer and renderer
  • Added project files for Delphi 10.2 Tokyo (DX2)

Some control properties where removed:

  • property “RenderContextType” was removed from the VCL controls
  • property “Buffering” was removed from the FMX controls

Added functionality to store multiple outer SVG docs in one TSVGRoot element that reference each other.

Added TSVGRenderContextManager for managing the selection of a render context type and the appropriate object types for buffers and pathdata

Created a new VCL Viewer demo application

Replaced some types with special types to have more control, TSVGFloat for double or single, TSVGPoint for TPointF, TSVGMatrix for TMatrix, TSVGRect for TRectF, default float is now a double

Split the style attribute list of the rendering elements into StyleAttributes, InlineStyle And StylesheetStyle, so the correct priority of styles can be implemented.

Simplified the code by placing shared objects in the SVGRoot, in stead of passing them as parameters in functions, for example CTM (current transformation matrix), CVP (current viewport), CSA (current style attribues), CRC (current render context)

Solved xml entity parsing bug

Solved a bug in parsing xml namespaces

Solved some viewport bugs

Solved bug in pattern rotation

Enabled parsing of embedded SVG files within image elements.

Set the correct default preserve aspect ratio on symbol, svg, marker and image elements

Implemented “inherit” option on a number of attributes

Solved bugs in gradients for VCL, these should now all render correctly in VCL, including radial gradients with focus

Added the gradient stop color and gradient stop opacity style attributes

Added miter limit style attribute

Added current color style attribute

More efficient pathdata storage (used Direct2D, GDI+ pathdata types to avoid conversion)

Improved glyph redering on VCL

Split axis-aligned and non-axis-aligned clippath rendering on VCL. axis-aligned will be faster, non-axis-aligned slower but more accurate, using a alpha-mask

Created a seperate unit “BVE.RenderContextCanvas.FMX.pas” for the render context implementation for FMX.

Version 2.1, 28-4-2016

Biggest changes are:

  • Replaced the DOM parser for a faster SAX parser
  • Transparency for VCL controls
  • SVG Fonts
  • Masks
  • Markers
  • Support for Delphi DX1 Berlin

1-5-2016: Fix, packages split into design-time and run-time

2-5-2016: Fix wrong path in Fmx designer package to image list component editor


Added, XML reader for the SAX parser


Added, SAX parser
Added logic for parsing external references in an SVG doc
Added logic for parsing a subset of an SVG doc
Added name spaces logic


Removed, the old (DOM) parser


Added CSS font selection rules


Added Quadratic bezier
Faster copying of PathData


Added FontStyle, FontVariant, FontWeight, FontStyles, FontStretch, FontFamily attributes
Added support of non-inherited attributes


Added ISVGFontFace
Added ISVGGlyph, ISVGFont
Added ISVGPolygon, ISVGPolyLine
Added ISVGGradientStop, ISVGGradient, ISVGLinearGradient, ISVGRadialGradient
Added ISVGTextRef
Added ISVGFilter, ISVGFilterPrimitive, ISVGFilterGaussianBlur
Added ISVGPattern
Added ISVGMask


Added TSVGFontFace
Added TSVGGlyph, TSVGFont
Added Font selection rules
Added Glyph selection rules
Added missing Glyph logic
Added TSVGKern
Added TSVGPathShape, TSVGPolygon, TSVGPolyline
Added TSVGElement as a base class for all elements
Added TSVGGradientStop, TSVGGradient, TSVGLinearGradient, TSVGRadialGradient
Added Gradient ObjectBoundingBox logic
Added paint server logic
Added TSVGTextRef
Added TSVGFilter, TSVGFilterPrimitive
Added TSVGPattern
Added TSVGMask
Added Clippath ObjectBoundingBox logic
Added clipping logic to markers, symbols and images
Improved white space handling on text
Temporary buffer for group opacity
Improved viewport logic
Split rendering in two passes, one to calculate style attributes and one to render


Added, component TSVG2Graphic for VCL derived from TGraphic


Rewrote the unit to support masking


Reworked to support the SAX parser
Removed option buffering, now always buffered
Changed parent class from TWinControl to TGraphicControl to enable transparency
Added clipping calculation to control buffersize


Reworked to support the SAX parser
Changed parent class from TWinControl to TGraphicControl to enable transparency
Made it a wrapper around the TSVG2Graphic.VCL class


Reworked to support the SAX parser




Reworked to support the SAX parser


Reworked to support the SAX parser


Complete rewrite

Version 2.01, 1-11-2015


Added event type TSVGOnCreateObjectEvent
Added event type TSVGOnCreatTextChildEvent


Implemented events TSVGOnCreateObjectEvent and TSVGOnCreatTextChildEvent


Changed implementation of function SVGParse to prevent parsing the document 2x


Changed implementation of function SVGParse to prevent parsing the document 2x


Added property SVGDoc (not published, so runtime access only)
Solved memory leak on BitmapMargins (TBounds) object
Solved bug that prevented application of the RenderOptions on the TSVG2Image object