ImageEn, unit iexSVG

IEParseSVGTextTag


Declaration

function IEParseSVGTextTag(const TagContent: string; out X, Y: Double; out Text: string; var FontName: string; var FontSizePx: Double; var FontColor: TColor;
                           var FontStyle: TFontStyles; var Opacity: Double; StyleDefinitions: TStringList = nil; InitializeStyles: Boolean = True): Boolean; overload;
function IEParseSVGTextTag(const Tag: TIESVGTag; ScaleX, ScaleY: Double; out X, Y: Double; out Text: string; var FontName: string; var FontSizePx: Double; var FontColor: TColor;
                           var FontStyle: TFontStyles; var Opacity: Double; var ToRotate: Double; StyleDefinitions: TStringList = nil; InitializeStyles: Boolean = True;
                           ProcessTransforms: Boolean = True): Boolean; overload;


Description

Parse an SVG text tag and output the found properties.
If InitializeStyles is true, any styles not specified will be reset to SVG defaults.
If ProcessTransforms is true, any transforms attributes found in the tag will be used to move or scale the object (and the ToRotate var will be filled).
Result is false if the tag could not be parsed.

Note: X,Y specifies the Top-Left of the text (not bottom left as with SVG)


Demo

Demo  Demos\InputOutput\SVGParsing\SVGParsing.dpr


Examples

IEParseSVGTextTag( '<text x="400" y="80" font-family="Arial, Helvetica, sans-serif" font-size="24">This is SVG Text</text>',
                   x, y, text fontName, fontSizePx fontColor, fontStyle, opacity );


See Also

ParseSVG
IEParseSVGImageTag
IEParseSVGLineTag
IEParseSVGPathTag
IEParseSVGPolyTag
IEParseSVGShapeTag