Declaration
function IEParseSVGPathTag(const TagContent: string; var Points: TIEDPointArray; var PointFormats: TIEPointFormatArray; var PointCount: Integer;
var StrokeWidth: Double; var StrokeColor: TColor; var FillColor: TColor; var Opacity: Double;
StyleDefinitions: TStringList = nil; InitializeStyles: Boolean = True): Boolean; overload;
function IEParseSVGPathTag(const Tag: TIESVGTag; ScaleX, ScaleY: Double; var Points: TIEDPointArray; var PointFormats: TIEPointFormatArray; var PointCount: Integer;
var StrokeWidth: Double; var StrokeColor: TColor; var FillColor: TColor; var Opacity: Double;
StyleDefinitions: TStringList = nil; InitializeStyles: Boolean = True; ProcessTransforms: Boolean = True): Boolean; overload;
Description
Parse an SVG path tag and output the found points and style 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.
| Demos\InputOutput\SVGParsing\SVGParsing.dpr |
IEParseSVGPathTag( '<path d="M 10 80 Q 95 10 180 80" stroke="black" fill="white"/>', pts, fmts, ptCount, strokeWidth, strokeColor, fillColor, opacity );
IEParseSVGPathTag( '<path d="M550 280 l30 90 l-65 0 z" style="fill:pink;stroke:purple;stroke-width:3" opacity="0.60"/>', pts, fmts, ptCount, strokeWidth, strokeColor, fillColor, opacity );
IEParseSVGPathTag( '<path d="M550 205 L475 400 L625 400 Z" style="fill:lavender;stroke:purple;stroke-width:3" opacity="0.40"/>', pts, fmts, ptCount, strokeWidth, strokeColor, fillColor, opacity );
See Also
◼ParseSVG◼IEParseSVGImageTag◼IEParseSVGLineTag◼IEParseSVGPolyTag◼IEParseSVGShapeTag◼IEParseSVGTextTag