Hide Comments
Hide Comments

Comments (0)

Represents a SVG 'svg' element. An SVG document fragment consists of any number of SVG elements contained within an ‘svg’ element. The TSVGDocument class represents the actual SVG.

The TSVGDocument class is the base class for parsing a SVG and generating TSVGxxxElement classes to describe the SVG. Use the TSVGDocument class to load an SVG and paint the SVG to a TCanvas.

noteNote

The TSVGDocument is only available at run-time. The TRSSVGDocument (VCL) and TRSFMXSVGDocument (FMX) expose the TSVGDocument for loading at design-time.

Namespace: FMX.RS.SVG

expandingInheritance Hierarchy

TPersistent
  FMX.RS.SVG.TSVGElement
    FMX.RS.SVG.TSVGGraphicElement
      FMX.RS.SVG.TSVGCustomGroup
        FMX.RS.SVG.TSVGCustomViewBox
          FMX.RS.SVG.TSVGDocument
 

expandingSyntax

Delphi

type
  TSVGDocument = class(TSVGCustomViewBox)
  end;
 

expandingConstructors

 

Name

Description

public constructor

Create(TSVGDocument)

Initializes a new instance of the TSVGDocument class. (Overrides FMX.RS.SVG.TSVGCustomViewBox.Create(TSVGDocument).)

public destructor

Destroy

Represents the destructor of the TSVGDocument class. (Overrides FMX.RS.SVG.TSVGCustomViewBox.Destroy.)

Top

expandingProperties

 

Name

Description

public property

AllItems

Contains all SVG elements (visual and non-visual) parsed from a SVG. The TSVGElement.ID property is the hash for each element.

public property

AspectRatio

Defines how the viewport stretches graphics to fill the viewport. (Inherited from FMX.RS.SVG.TSVGCustomViewBox.)

public property

Attributes

Represents property Attributes. (Inherited from FMX.RS.SVG.TSVGElement.)

public property

BoundsRect

Returns the bounding rectangle for the SVG element unmodified by any transformations

To retrieve the "true" bounding rectangle which has been modified by any transformations, use the GetBoundsRect method

published property

Brush

Brush used for drawing the fill portions of the SVG element (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected property

BrushChanged

Represents property BrushChanged. (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

published property

Classes

Specifies the 'classes' that the SVG element belongs to. The classes property assigns one or more class names to an element. The element may be said to belong to these classes. A class name may be shared by several element instances. (Inherited from FMX.RS.SVG.TSVGElement.)

protected property

ClippingChanged

Represents property ClippingChanged. (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

public property

ClipRect

Returns the clipping rectangle for the element (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

published property

ClipRule

Clipping rule for how this element adds to the clipping path (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

published property

ClipURI

ID of the SVG element that provides the clipping region (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

public property

ClipURIElement

Returns the SVG element that provides the clipping region for the current element.

The ClipURI property specifies the ID of the SVG element that provides the clipping region

published property

ColorInterpolation

Color interpolation type, which specifies the color space for gradient interpolations and alpha compositing

VCL Only

published property

ColorRendering

Color rendering type, which provides a hint to the SVG library about how to optimize its color interpolation and compositing operations.

VCL Only

published property

Cursor

Cursor to use when over this element type (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

published property

DefaultAspectRatio

Defines the default aspect ratio for the SVG. If the SVG does not specify a preserveAspectRatio attribute, the SVG will use this default instead.

published property

DefaultColorInterpolation

Default Color interpolation type, which specifies the color space for gradient interpolations and alpha compositing

VCL Only

published property

DefaultColorRendering

Default Color rendering type, which provides a hint to the SVG library about how to optimize its color interpolation and compositing operations.

VCL Only

published property

DefaultShapeRendering

Default Shape rendering type, which provides a hint to the SVG library about what tradeoffs to make as it renders vector graphics elements such as path elements and basic shapes such as circles and rectangles.

VCL Only

published property

DefaultTextRendering

Default Text rendering type, which provides a hint to the SVG library about what tradeoffs to make as it renders text

VCL Only

published property

Description

Specifies a non-visual Description for the SVG element. When generating FMX controls, the FMX control's Hint property is set to the Description. If the Description is empty, the Hint is set to the Title (Inherited from FMX.RS.SVG.TSVGElement.)

published property

DPI

Dots per inch used in calculating the unit factors for conversion of string lengths into actual values. The DPI should be set before loading SVG.

For example, if the input string contains '1cm', the DPI helps the SVG library figure out how large a centimeter is.

published property

FillRule

Indicates the algorithm which is to be used to determine what parts of the canvas are included inside the element shape. For a simple, non-intersecting path, it is intuitively clear what region lies "inside"; however, for a more complex path, such as a path that intersects itself or where one subpath encloses another, the interpretation of "inside" is not so obvious. (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

published property

Font

Font used for drawing the Text portions of the SVG element (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected property

FontChanged

Represents property FontChanged. (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

published property

Height

Represents property Height.

published property

ID

Unique name for the SVG element. The SVG document's   AllItems property uses the ID as the unique hash for returning SVG elements (Inherited from FMX.RS.SVG.TSVGElement.)

public property

Inherits

Style properties or attributes which inherits their values from the Parent. (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

public property

Items

The child SVG Items of the current element. The Parent and Items properties define the hierarchy of a SVG document fragment. (Inherited from FMX.RS.SVG.TSVGElement.)

published property

Language

Specifies the Language of the SVG element (Inherited from FMX.RS.SVG.TSVGElement.)

published property

MarkerEndURI

ID of the SVG element that defines arrowhead or polymarker that shall be drawn at the final vertex of the given path element or basic shape (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

published property

MarkerMidURI

ID of the SVG element that defines arrowhead or polymarker that shall be drawn at the every other vertex (i.e., every vertex except the first and last) of the given path element or basic shape (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

published property

MarkerStartURI

ID of the SVG element that defines arrowhead or polymarker that shall be drawn at the first vertex of the given path element or basic shape (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

public property

Matrix

Local Transformation matrix for the element

Note that the final transformation of the element depends on its Parents' transformation matrices

published property

OnChange

Occurs when the SVG has changed

published property

Opacity

Uniform opacity setting to be applied across an entire object, as a . Any values outside the range 0.0 (fully transparent) to 1.0 (fully opaque) will be clamped to this range. (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

published property

Options

Controls how the SVG is loaded and displayed

public property

Overflow

Represents property Overflow. (Inherited from FMX.RS.SVG.TSVGCustomViewBox.)

public property

Owner

Returns the Owner SVG document for the SVG element. (Inherited from FMX.RS.SVG.TSVGElement.)

public property

Parent

The Parent SVG Element of the current element. The Parent and Items properties define the hierarchy of a SVG document fragment. (Inherited from FMX.RS.SVG.TSVGElement.)

published property

Pen

Pen used for drawing the stroke portions of the SVG element (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected property

PenChanged

Represents property PenChanged. (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

published property

PreferredLanguage

Specifies the preferred language to use for the SVG. The TSVGSwitch element uses the language and the SystemLanguage property of TSVGElements to choose the SVG element to display (conceptually, this is localization of text or even graphics for an SVG)

protected property

PrefLanguages

Represents property PrefLanguages.

published property

RequiredExtensions

Specifies a list of required language extensions. Language extensions are capabilities within a user agent that go beyond the feature set defined in this specification. Each extension is identified by an IRI reference.

The RSCL supports no extensions.

published property

RequiredFeatures

Defines a list of feature strings. Determines whether all of the named features are supported by the RSCL. (Inherited from FMX.RS.SVG.TSVGElement.)

protected property

Shape

Represents property Shape. (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected property

ShapeCacheChanged

Represents property ShapeCacheChanged. (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

published property

ShapeRendering

Shape rendering type, which provides a hint to the SVG library about what tradeoffs to make as it renders vector graphics elements such as path elements and basic shapes such as circles and rectangles.

VCL Only

published property

Style

Style for the element, the properties or attributes explicitly set by the element and not inherited or set by another style (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

public property

Styles

Contains all styles in the SVG. Use the Styles property to add, modify, and delete styles that affect the SVG elements.

published property

SystemLanguages

Specifies a list of language names as defined in BCP 47 (Inherited from FMX.RS.SVG.TSVGElement.)

published property

TextAlign

Defines the Text alignment, which is used to align (start-, middle- or end-alignment) a string of text relative to a given point (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

published property

TextRendering

Text rendering type, which provides a hint to the SVG library about what tradeoffs to make as it renders text

VCL Only

published property

Title

Specifies a non-visual Title of the SVG element. When generating FMX controls, the FMX control's Hint property is set to Title if the Description property is empty (Inherited from FMX.RS.SVG.TSVGElement.)

protected property

UnitFactors

Represents property UnitFactors.

protected property

UpdateCount

Represents property UpdateCount. (Inherited from FMX.RS.SVG.TSVGElement.)

public property

ViewBox

Rectangle in user space which should be mapped to the bounds of the viewport established by the given element, taking into account the PreserveAspectRatio property. If   ViewBoxSpecified is true, an additional transformation is applied to all descendants of the given element to achieve the specified effect. (Inherited from FMX.RS.SVG.TSVGCustomViewBox.)

public property

ViewBoxSpecified

Controls whether the   ViewBox property has been specified (and not just default) and should be applied to descendant elements. (Inherited from FMX.RS.SVG.TSVGCustomViewBox.)

published property

Visible

Visibility of the element, whether it should be painted or not (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

published property

Width

Represents property Width.

published property

X

Represents property X.

published property

Y

Represents property Y.

Top

expandingMethods

 

Name

Description

public method

ApplyStyle(TSVGStyle)

Applies the input style to the SVG element (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

public method

ApplyStyles

Applies all styles that match the element to the element. All child elements also have their styles applied. (Overrides FMX.RS.SVG.TSVGGraphicElement.ApplyStyles.)

public method

Assign(TPersistent)

Represents method Assign(TPersistent). (Inherited from FMX.RS.SVG.TSVGElement.)

public method

AssignProperties(TPersistent)

Copies the properties of source to the current element (but not children) (Overrides FMX.RS.SVG.TSVGCustomViewBox.AssignProperties(TPersistent).)

protected method

AssignTo(TPersistent)

Represents method AssignTo(TPersistent). (Overrides FMX.RS.SVG.TSVGElement.AssignTo(TPersistent).)

protected method

BeginDraw(TSVGMatrix,TSVGCanvas,TSVGRect)

Represents method BeginDraw(TSVGMatrix,TSVGCanvas,TSVGRect). (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

public method

BeginUpdate

Marks the start of an update session of the element and its children.
 
No change events occur after the BeginUpdate call. A call to BeginUpdate must be complemented by calls to EndUpdate after the update is finished.
 
 (Inherited from FMX.RS.SVG.TSVGElement.)

protected method

BuildClipRegion(TSVGClipRegion,TSVGMatrix,TSVGRect)

Represents method BuildClipRegion(TSVGClipRegion,TSVGMatrix,TSVGRect). (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected method

CalcUnitFactors

Represents method CalcUnitFactors.

protected method

Change

Represents method Change. (Overrides FMX.RS.SVG.TSVGCustomGroup.Change.)

public method

Clear

Clears the SVG element and resets its properties back to their defaults (Overrides FMX.RS.SVG.TSVGCustomViewBox.Clear.)

public method

Clone(TSVGDocument)

Clones the element and all of its child elements. The aOwner parameter should be a different document (Inherited from FMX.RS.SVG.TSVGElement.)

protected method

CreateControl(TControl)

Represents method CreateControl(TControl). (Inherited from FMX.RS.SVG.TSVGElement.)

protected method

DefineView(TSVGRect,TSVGPreserveAspectRatio,Single,Single,Single,Single)

Represents method DefineView(TSVGRect,TSVGPreserveAspectRatio,Single,Single,Single,Single). (Inherited from FMX.RS.SVG.TSVGCustomViewBox.)

protected method

DoAddStyle(String,String)

Represents method DoAddStyle(String,String).

protected method

DoDrawing(TObject,TSVGMatrix,TSVGCanvas,TSVGRect)

Represents method DoDrawing(TObject,TSVGMatrix,TSVGCanvas,TSVGRect). (Overrides FMX.RS.SVG.TSVGGraphicElement.DoDrawing(TObject,TSVGMatrix,TSVGCanvas,TSVGRect).)

protected method

DoDrawn(TObject,TSVGMatrix,TSVGCanvas,TSVGRect)

Represents method DoDrawn(TObject,TSVGMatrix,TSVGCanvas,TSVGRect). (Overrides FMX.RS.SVG.TSVGGraphicElement.DoDrawn(TObject,TSVGMatrix,TSVGCanvas,TSVGRect).)

protected method

DoInternalDraw(TSVGMatrix,TSVGCanvas,TSVGRect)

Represents method DoInternalDraw(TSVGMatrix,TSVGCanvas,TSVGRect). (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected method

DoLoadFromXML(IXMLNode)

Represents method DoLoadFromXML(IXMLNode). (Overrides FMX.RS.SVG.TSVGGraphicElement.DoLoadFromXML(IXMLNode).)

protected method

DoModifyControl(TControl,TMatrix,TRectF,TSVGControlElementEvent)

Represents method DoModifyControl(TControl,TMatrix,TRectF,TSVGControlElementEvent). (Overrides FMX.RS.SVG.TSVGGraphicElement.DoModifyControl(TControl,TMatrix,TRectF,TSVGControlElementEvent).)

protected method

DoOnParsedNode(TSVGElement)

Represents method DoOnParsedNode(TSVGElement). (Overrides FMX.RS.SVG.TSVGElement.DoOnParsedNode(TSVGElement).)

protected method

DoOnParsingNode(TSVGElement,IXMLNode)

Represents method DoOnParsingNode(TSVGElement,IXMLNode). (Overrides FMX.RS.SVG.TSVGElement.DoOnParsingNode(TSVGElement,IXMLNode).)

public method

Draw(TMatrix,TSVGCanvas,TSVGRect)

Represents method Draw(TMatrix,TSVGCanvas,TSVGRect).

protected method

DrawChildren(TSVGMatrix,TSVGCanvas,TSVGRect)

Represents method DrawChildren(TSVGMatrix,TSVGCanvas,TSVGRect). (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected method

DrawMarkers(TRSPathData,TSVGMatrix,TSVGCanvas,TSVGRect)

Overloaded. Represents method DrawMarkers(TRSPathData,TSVGMatrix,TSVGCanvas,TSVGRect). (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected method

DrawMarkers(TRSPoints,TSVGMatrix,TSVGCanvas,TSVGRect)

Overloaded. Represents method DrawMarkers(TRSPoints,TSVGMatrix,TSVGCanvas,TSVGRect). (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected method

DrawPath(TRSPathData,TSVGMatrix,TSVGCanvas,TSVGRect)

Overloaded. Represents method DrawPath(TRSPathData,TSVGMatrix,TSVGCanvas,TSVGRect). (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected method

ElementNotification(TObject,TSVGElement,TCollectionNotification)

Represents method ElementNotification(TObject,TSVGElement,TCollectionNotification). (Inherited from FMX.RS.SVG.TSVGElement.)

protected method

EndDraw(TSVGMatrix,TSVGCanvas,TSVGRect)

Represents method EndDraw(TSVGMatrix,TSVGCanvas,TSVGRect). (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

public method

EndUpdate

Marks the end of an update session of the element and its children.
 
The update session must be started first by calling BeginUpdate.
 
EndUpdate decreases a updating semaphore. If all update sessions end and the semaphore is 0, EndUpdate signals a OnChange event.
 (Inherited from FMX.RS.SVG.TSVGElement.)

protected method

FillPolygons(TSVGMatrix,TSVGCanvas)

Represents method FillPolygons(TSVGMatrix,TSVGCanvas). (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

public method

FitToRect(TSVGRect)

Overloaded. Returns a transformation matrix that will properly scale and translate the SVG element's   BoundsRect so that it fits within the input rectangle (Inherited from FMX.RS.SVG.TSVGElement.)

public method

FitToRect(TSVGRect,TSVGRect)

Overloaded. Returns a transformation matrix that will properly scale and translate the TargetRect so that it fits within the input rectangle (Inherited from FMX.RS.SVG.TSVGElement.)

protected method

GenerateChildControls(TControl,TSVGMatrix,TRSRect,TSVGControlElementEvent)

Represents method GenerateChildControls(TControl,TSVGMatrix,TRSRect,TSVGControlElementEvent). (Inherited from FMX.RS.SVG.TSVGElement.)

public method

GenerateControls(TControl,TRSRect,TSVGControlElementEvent)

Overloaded.  Generates FMX controls to represent this SVG element and its children. The Parent parameter specifies the parent control for the generated FMX control.

The FMX control is transformed by a matrix returned from the GetViewMatrix function

public method

GenerateControls(TControl,TSVGMatrix,TRSRect,TSVGControlElementEvent)

Overloaded. Generates FMX controls to represent this SVG element and its children. The Parent parameter specifies the parent control for the generated FMX control. (Inherited from FMX.RS.SVG.TSVGElement.)

protected method

GenerateMarkers(TControl,TRSPathData,TMatrix,TRSRect,TSVGControlElementEvent)

Overloaded. Represents method GenerateMarkers(TControl,TRSPathData,TMatrix,TRSRect,TSVGControlElementEvent). (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected method

GenerateMarkers(TControl,TRSPoints,TMatrix,TRSRect,TSVGControlElementEvent)

Overloaded. Represents method GenerateMarkers(TControl,TRSPoints,TMatrix,TRSRect,TSVGControlElementEvent). (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

public method

GetAbsoluteOpacity

Returns the opacity of the SVG element modified with its Parents' opacities (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected method

GetBoundsRect

Represents method GetBoundsRect. (Overrides FMX.RS.SVG.TSVGCustomGroup.GetBoundsRect.)

public method

GetBoundsRect(TSVGMatrix)

Returns the "true" BoundsRect where the boundaries of the element are modified by the input matrix plus (for graphic elements) its transformation Matrix (Overrides FMX.RS.SVG.TSVGCustomGroup.GetBoundsRect(TSVGMatrix).)

protected method

GetBrush

Overloaded. Represents method GetBrush. (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

public method

GetBrush(TSVGMatrix,TRSRect)

Overloaded. Returns the Brush for the element, configured for the transformation and rectangle. (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

public method

GetClipPath(TSVGCanvas)

Returns the clipping region of the current element based on its shape and its children's shape (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected method

GetClipRect

Represents method GetClipRect. (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected method

GetFont

Represents method GetFont. (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

public method

GetGraphicParent

Returns the closest ancestor SVG element that is a TSVGGraphicElement class (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected method

GetHeight

Represents method GetHeight. (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

public method

GetNearestViewBox

Returns the nearest ancestor (Parent, or Parent of Parent, or etc) element that is a TSVGCustomViewBox element (Inherited from FMX.RS.SVG.TSVGElement.)

protected method

GetPen

Overloaded. Represents method GetPen. (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

public method

GetPen(TSVGMatrix,TRSRect)

Overloaded. Returns the Pen for the element, configured for the transformation and rectangle. (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected method

GetShape

Represents method GetShape. (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected method

GetUnitFactors

Represents method GetUnitFactors. (Overrides FMX.RS.SVG.TSVGElement.GetUnitFactors.)

public method

GetViewMatrix(TRect)

Overloaded. Returns a transformation matrix for viewing this element (Inherited from FMX.RS.SVG.TSVGElement.)

public method

GetViewMatrix(TSVGMatrix,TRect)

Overloaded. Returns a transformation matrix for viewing this element (Inherited from FMX.RS.SVG.TSVGElement.)

public method

GetViewMatrix(TSVGMatrix,TSVGRect)

Returns a transformation matrix for viewing this element (Overrides FMX.RS.SVG.TSVGCustomViewBox.GetViewMatrix(TSVGMatrix,TSVGRect).)

public method

GetViewMatrix(TSVGRect)

Overloaded. Returns a transformation matrix for viewing this element (Inherited from FMX.RS.SVG.TSVGElement.)

protected method

GetWidth

Represents method GetWidth. (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected method

GetX

Represents method GetX. (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected method

GetY

Represents method GetY. (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

public method

HasAncestor(TSVGElement)

Returns true if the input element is an ancestor of the current SVG element (Inherited from FMX.RS.SVG.TSVGElement.)

public method

HasChild(TSVGElement)

Returns true if the input element is a direct child of the current SVG element (Inherited from FMX.RS.SVG.TSVGElement.)

public method

HasDescendant(TSVGElement)

Returns true if the input element is a descendant of the current SVG element (Inherited from FMX.RS.SVG.TSVGElement.)

public method

HasExtensions

Returns true if the required extensions are present. The RSCL supports no extensions at this time, if RequiredExtensions is not empty, this method will return False (Inherited from FMX.RS.SVG.TSVGElement.)

public method

HasFeatures

Returns true if the Owner document supports all of the features of the element. If all of the given features are supported, then the function evaluates to true; otherwise, the current element and its children are skipped and thus will not be rendered. (Inherited from FMX.RS.SVG.TSVGElement.)

public method

HasFollowing(TSVGElement)

Returns true if the input element follows the current SVG element (Inherited from FMX.RS.SVG.TSVGElement.)

public method

HasLanguage(String)

Returns True if the Language property matches the language IDs in the input parameter. Multiple languages can be specified by separating the language IDs with commas and/or spaces. (Inherited from FMX.RS.SVG.TSVGElement.)

public method

HasLanguages

Returns True if the Owner SVG document fragment supports the Language property or one of the SystemLanguages (Inherited from FMX.RS.SVG.TSVGElement.)

public method

HasPreceding(TSVGElement)

Returns true if the input element precedes the current SVG element (Inherited from FMX.RS.SVG.TSVGElement.)

public method

HasSibling(TSVGElement)

Returns true if the input element is a sibling (share same Parent) of the current SVG element (Inherited from FMX.RS.SVG.TSVGElement.)

protected method

InternalDraw(TSVGMatrix,TSVGCanvas,TSVGRect)

Represents method InternalDraw(TSVGMatrix,TSVGCanvas,TSVGRect). (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

public methodClass member

IsValidSVG(Boolean,String)

Overloaded.  Returns True if the Text contains a valid SVG

The StrictVerification parameter controls how the text is validated. If false (the default), the function quickly checks if the text contains well-formed XML and has a < svg> node. If true, the function parses the text entirely and sees if there are any errors (much slower but more thorough)

public methodClass member

IsValidSVG(IXMLDocument,Boolean)

Overloaded.  Returns True if the file is a valid SVG

The StrictVerification parameter controls how the XML document is validated. If false (the default), the function quickly checks if the XML document has a <svg> node. If true, the function parses the entire XML document and sees if there are any errors (much slower but more thorough)

public methodClass member

IsValidSVG(String,Boolean)

Overloaded.  Returns True if the file is a valid SVG

The StrictVerification parameter controls how the file is validated. If false (the default), the function quickly checks if the file contains well-formed XML and has a < svg> node. If true, the function parses the file entirely and sees if there are any errors (much slower but more thorough)

public methodClass member

IsValidSVG(TStream,Boolean)

Overloaded.  Returns True if the stream contains a valid SVG

The StrictVerification parameter controls how the stream is validated. If false (the default), the function quickly checks if the stream contains well-formed XML and has a < svg> node. If true, the function parses the stream entirely and sees if there are any errors (much slower but more thorough)

public method

LoadFromFile(String)

Load the SVG from a file

public method

LoadFromStream(TStream)

Load the SVG from a stream

public method

LoadFromText(String)

Load the SVG from a string

public method

LoadFromXML(IXMLDocument)

Overloaded. Load the SVG from a XML document interface

public method

LoadFromXML(IXMLNode)

Overloaded. Load the SVG from a XML node. The XML node local name must be 'svg' (Overrides FMX.RS.SVG.TSVGGraphicElement.LoadFromXML(IXMLNode).)

public method

Matches(String)

Returns the specificity (>=0) of the match with the selector string or -1 if there is no match.

A selector's specificity is calculated as follows:

1. Count the number of ID selectors in the selector (= a)
2. Count the number of class selectors, attributes selectors, and pseudo-classes in the selector (= b)
3. Count the number of type selectors and pseudo-elements in the selector (= c)
4. Ignore the universal selector
5. Selectors inside the negation pseudo-class are counted like any other, but the negation itself does not count as a pseudo-class.




























































Concatenating the three numbers a-b-c (in a number system with a large base) gives the specificity.
 (Overrides FMX.RS.SVG.TSVGElement.Matches(String).)



protected method

ObjectPropChange(TObject)

Represents method ObjectPropChange(TObject). (Overrides FMX.RS.SVG.TSVGElement.ObjectPropChange(TObject).)

protected method

PerformClipping(TSVGMatrix,TSVGCanvas,TSVGRect)

Represents method PerformClipping(TSVGMatrix,TSVGCanvas,TSVGRect). (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected method

ReadChild(IXMLNode)

Represents method ReadChild(IXMLNode). (Overrides FMX.RS.SVG.TSVGCustomGroup.ReadChild(IXMLNode).)

protected method

ReadChildren(IXMLNode)

Represents method ReadChildren(IXMLNode). (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected method

ReadStyles(IXMLNode)

Overloaded. Represents method ReadStyles(IXMLNode).

protected method

ReadStyles(String)

Overloaded. Represents method ReadStyles(String).

public method

Reset

Resets the SVG for drawing (Overrides FMX.RS.SVG.TSVGElement.Reset.)

protected method

SetCanvasPen(TSVGCanvas,TMatrix,Boolean)

Represents method SetCanvasPen(TSVGCanvas,TMatrix,Boolean). (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected method

SetHeight(Single)

Represents method SetHeight(Single). (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected method

SetParent(TSVGElement)

Represents method SetParent(TSVGElement). (Overrides FMX.RS.SVG.TSVGElement.SetParent(TSVGElement).)

protected method

SetWidth(Single)

Represents method SetWidth(Single). (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected method

SetX(Single)

Represents method SetX(Single). (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected method

SetY(Single)

Represents method SetY(Single). (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected method

ShouldDraw

Represents method ShouldDraw. (Overrides FMX.RS.SVG.TSVGElement.ShouldDraw.)

protected method

StyleNotify(TObject,TSVGStyle,TCollectionNotification)

Represents method StyleNotify(TObject,TSVGStyle,TCollectionNotification).

public method

SupportsFeature(String)

Returns True if the RSCL supports the feature specified by the string

The feature parameter should be in the RSSVGTypes|SVGFeatures constant

public method

SupportsLanguage(String)

Returns True if the Language parameter contains at least one language supported by the current locale (if soUseLocaleForLanguage in Options) or by the PreferredLanguage property

public methodClass member

SVGType

Returns the SVG element type of the class (Overrides FMX.RS.SVG.TSVGCustomGroup.SVGType.)

public methodClass member

SVGTypeName

Returns the SVG element type name (e.g., 'g', 'rect', etc) (Inherited from FMX.RS.SVG.TSVGElement.)

protected method

UpdateInherits(Boolean,TSVGStyleProperties,TSVGStyleProperty)

Represents method UpdateInherits(Boolean,TSVGStyleProperties,TSVGStyleProperty). (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

Top

expandingEvents

 

Name

Description

published event

OnAddStyle

Occurs when a style is added to the document

published event

OnDrawing

Occurs just before a SVG element is drawn

published event

OnDrawn

Occurs just after a SVG element is drawn

published event

OnParsedNode

Occurs just after a SVG element's children are parsed by the RSCL. This event occurs when a SVG element and all of its children are loaded and parsed

published event

OnParsingNode

Occurs just before a SVG element's children are parsed by the RSCL. This event occurs when a SVG element has been parsed for its own attributes but before any of its children are loaded and parsed

published event

OnRemoveStyle

Occurs when a style is extracted or removed from the document

Top

expandingFields

 

Name

Description

public fieldClass member

ControlConstructor

Represents field ControlConstructor. (Inherited from FMX.RS.SVG.TSVGElement.)

protected field

FAttributes

Represents field FAttributes. (Inherited from FMX.RS.SVG.TSVGElement.)

protected field

FHeight

Represents field FHeight. (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected field

FInherits

Represents field FInherits. (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected field

FWidth

Represents field FWidth. (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected field

FX

Represents field FX. (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected field

FY

Represents field FY. (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected field

HeightIsPercent

Represents field HeightIsPercent. (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected field

WidthIsPercent

Represents field WidthIsPercent. (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected field

XIsPercent

Represents field XIsPercent. (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

protected field

YIsPercent

Represents field YIsPercent. (Inherited from FMX.RS.SVG.TSVGGraphicElement.)

Top

expandingExamples

The following example creates a TSVGDocument, loads an SVG and then paints it in a TPaintBox

Delphi

procedure TForm20.FormCreate(Sender: TObject);
 begin
   Doc := TSVGDocument.Create(nil);
   Doc.PreferredLanguage := 'en';
 end;
 procedure TForm20.PaintBox1Paint(Sender: TObject; Canvas: TCanvas);
 var
   StopWatch: TStopWatch;
 begin
   StopWatch := TStopwatch.Create;
   StopWatch.Start;
   Doc.Draw(Canvas, PaintBox1.BoundsRect);
   StopWatch.Stop;
   lblPaintTime.Text := 'Paint Time: '+FloatToStr(StopWatch.Elapsed.TotalMilliseconds);
 end;

expandingSee Also

Comments (0)

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