Hide Comments
Hide Comments

What's New in RSCL v2.0

Comments (0)

Version 2.0 of the RiverSoftAVG SVG Component Library is a major upgrade.  This version represents lots of new features, bug fixes, and some changes in behavior or interface to the SVG elements.  Please read the notes below.

 

New Features

 

Load, Edit and Save SVGs as SVG (XML)

Load, Edit, and Save SVGs as Delphi Binary (Faster but Larger Files)

Use SVG Image Lists (TRSSVGImageList, VCL & FMX XE8+) to save memory and disk space for your applications, especially on mobile

Vastly Improved Text Support including text on a path, tspan, text layout, spacing, kerning, and more

Improved Linear and Radial Gradient Support

Detect and respond to mouse events with TRSSVGImage

Embed SVGs as binary into Delphi form files as part of TRSSVGDocument

For XE4-10 Seattle (XE2 and XE3 support has been dropped)

 

Notes for SVG v1.x Owners

 

To refactor the SVG from a static SVG viewer to a static SVG editor required some major changes to the TSVGxxxElement classes and their properties, generally to be able to save properties that were read (before the elements would convert the svg values and then discard any extraneous information.  For example, to save a length value such as '1in' requires saving the raw value (1) and the unit (in) instead of the converted value (96 pixels).  Unfortunately, this required breaking some properties to provide clean code.  For example, TSVGMarker.MarkerHeight property changed from Single to TSVGLength (TPersistent) type.  Usually, you just need to change your code from Marker.MarkerHeight to Marker.MarkerHeight.Value

The behavior of TSVGDocument.OnChange event has changed.  The OnChange event usually does not get called when the structure of the SVG has changed anymore; please use the TSVGDocument.OnAddElement and TSVGDocument.OnRemoveElement property instead.  The Sender parameter is now set to the element where the change occurs.  If the Sender is nil, this means that the change event occurred because of BeginUpdate/EndUpdate method calls; in this case it can mean that the structure of the SVG document has changed.

The signature of the TSVGDocument/TRSSVGDocument/TRSFmxSVGDocument.OnDrawing event has changed to add a DoDraw parameter.  Set this parameter to False to not draw the current element.  However, the child elements may still be drawn.

Refactored ViewBox property from TSVGRect (record) to TSVGViewBox *object*

Moved basic SVG shape elements (rect, ellipse, etc) to RSSVG.BasicShapes.pas and FMX.RS.SVG.BasicShapes.pas

Moved SVG text elements to RSSVG.Text.pas and FMX.RS.SVGText.pas

 

Notes for SVG EEP Early Adopters

 

Renaming the TSVGGraphicElement XLength, YLength, WidthLength, and HeightLenght properties to Xu, Yu, WidthU and HeightU will have broken EmbedSVGAsBinary in your forms.  You may receive a "WidthLength.Raw property is missing" message when loading the form.  Using Notepad++ or some other text editor, open the .dfm or .fmx file and change "Length.Raw" to "U.Raw" and you should be able to load your forms without error.

Comments (0)

RiverSoftAVG SVG Component Library (RSCL) © 2013-2016, Thomas G. Grubb