function IEParseSVGImageTag(const TagContent: string; out X, Y, Width, Height: Double; var PreserveAspectRatio: Boolean; var Image: string; var Bitmap: TIEBitmap; var Opacity: Double; StyleDefinitions: TStringList = nil; InitializeStyles: Boolean = True): Boolean; overload; function IEParseSVGImageTag(const Tag: TIESVGTag; ScaleX, ScaleY: Double; out X, Y, Width, Height: Double; var PreserveAspectRatio: Boolean; var Image: string; var Bitmap: TIEBitmap; var Opacity: Double; var ToRotate: Double; StyleDefinitions: TStringList = nil; InitializeStyles: Boolean = True; ProcessTransforms: Boolean = True): Boolean; overload;
Description
Parse an SVG image tag and output the image and style properties.
If Bitmap is passed as nil, only Image will be filled with the href value. If bitmap is valid, it will be filled with the image.
The image can be an embedded base64 "xlink:href" reference, or an web-based file (if AllowWebDownload is enabled).
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.
// Load a web-based images using an SVG tag IEParseSVGImageTag( '<image x="20" y="20" height="94" width="313" href="http://www.imageen.com/graphics/ImageEnLogo.png" />', x, y, w, h, ar, imageStr, ImageEnView1.IEBitmap, opacity ); ImageEnView1.Update();
// Get the HREF for a web-based images in an SVG tag IEParseSVGImageTag( '<image x="20" y="20" height="94" width="313" href="http://www.imageen.com/graphics/ImageEnLogo.png" />', x, y, w, h, ar, imageStr, NIL, opacity );