ImageEn, unit iexSVG

IEParseSVGPolyTag


Declaration

function IEParseSVGPolyTag(const TagContent: string; var Points: TIEDPointArray; var PointCount: Integer; var IsClosed: Boolean;
                           var StrokeWidth: Double; var StrokeColor: TColor; var FillColor: TColor; var Opacity: Double; InitializeStyles: Boolean = True): Boolean; overload;
function IEParseSVGPolyTag(const Tag: TIESVGTag; PageScaleX, PageScaleY: Double; var Points: TIEDPointArray; var PointCount: Integer; var IsClosed: Boolean;
                           var StrokeWidth: Double; var StrokeColor: TColor; var FillColor: TColor; var Opacity: Double; var ToRotate: Double;
                           InitializeStyles: Boolean = True; ProcessTransforms: Boolean = True): Boolean; overload;


Description

Parse an SVG Polyline or Polygon 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.



Demo

Demo  Demos\InputOutput\SVGParsing\SVGParsing.dpr


Examples

IEParseSVGPolyTag( '<polygon points="100,10 150,190 50,190" fill="red" stroke="green" stroke-width="3" />, pts, ptCount, isClosed, strokeWidth, strokeColor, fillColor, opacity );

IEParseSVGPolyTag( '<polyline points="0,340 40,340 40,380 80,380 80,420 120,420 120,460" style="fill:yellow;stroke:red;stroke-width:4"/>, pts, ptCount, isClosed, strokeWidth, strokeColor, fillColor, opacity );


See Also

 ParseSVG
 IEParseSVGImageTag
 IEParseSVGLineTag
 IEParseSVGPathTag
 IEParseSVGShapeTag
 IEParseSVGTextTag