Change log

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 CompilerSettings.inc

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

BVE.SVG2XMLReader.pas

Added, XML reader for the SAX parser

BVE.SVG2SaxParser.pas

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

BVE.SVG2Parser.pas

Removed, the old (DOM) parser

BVE.SVG2CSSUtility

Added CSS font selection rules

BVE.SVG2PathData.pas

Added Quadratic bezier
Faster copying of PathData

BVE.SVG2Attributes.pas

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

BVE.SVG2Intf.pas

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

BVE.SVG2Elements.pas

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

BVE.SVG2Graphic.VCL.pas

Added, component TSVG2Graphic for VCL derived from TGraphic

BVE.RenderContextDirect2D.VCL.pas

Rewrote the unit to support masking

BVE.SVG2Control.VCL.pas

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

BVE.SVG2Image.VCL.pas

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

BVE.SVG2ImageList.VCL.pas

Reworked to support the SAX parser

BVE.SVG2LinkedImageList.VCL.pas

Added

BVE.SVG2Control.FMX.pas

Reworked to support the SAX parser

BVE.SVG2Image.FMX.pas

Reworked to support the SAX parser

BVE.SVG2ImageList.FMX.pas

Complete rewrite

Version 2.01, 1-11-2015

BVE.SVG2Intf.pas

Added event type TSVGOnCreateObjectEvent
Added event type TSVGOnCreatTextChildEvent

BVE.SVG2Parser.pas

Implemented events TSVGOnCreateObjectEvent and TSVGOnCreatTextChildEvent

BVE.SVG2Control.FMX.Pas

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

BVE.SVG2Control.VCL.Pas

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

BVE.SVG2Image.FMX.PAS

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