ImageEn, unit iexSVG

SVG Implementation Status


ImageEn provides a basic implementation of the SVG standard allowing SVG files to be loaded as bitmaps or imported as layers. Our implementation does not work well with:
Overly complex SVG files (many tags, or many points for a paths or polygons): May cause memory issues or not render
Objects that make use of multi-stop/radial gradients, path clipPaths or full CSS: Limited support
Text, particularly text that uses textPath: May not render correctly
Complex transforms: May not position correctly (rot-90 matrices and <use&gt; x/y under scale handled)
Paths containing Arcs: May not render correctly
Patterns, masks, path clipPaths, DTD entities, nested <svg preserveAspectRatio&gt;: unsupported

Implemented Tag Types

Tag Properties Notes
svg id, style, x, y, width, height, viewBox lowercase viewbox only if width/height missing
a id, href  
circle id, style, cx, cy, r, transform  
defs id, style, transform Gradients: 2-stop linear mapped to FillColor/FillColor2; otherwise first stop-color
desc id  
ellipse id, style, cx, cy, rx, ry, transform  
g id, style, transform  
image id, style, x, y, width, height, preserveAspectRatio, href, xlink:href, transform Enable AllowWebDownload to load web-based images
line id, style, x1, y1, x2, y2, transform  
linearGradient id, x1, y1, x2, y2, xlink:href 2-stop approx (first/last stop); direction → H/V/diag
path id, style, d, transform  
polygon id, style, points, transform  
polyline id, style, points, transform  
rect id, style, x, y, width, height, rx, ry, transform  
clipPath id, rect child Bitmap: element + <g&gt; rect clips (clip-path not inherited)
stop stop-color, offset Used by linearGradient (first + last stop)
style class rules Class selectors (.st0) for supported attrs; not full CSS
switch id, style, transform Conditions are not evaluated, only first tag is processed
symbol id, style, transform, viewBox Treated like g; viewBox mapped when referenced via use width/height
text id, style, x, y, font-family, font-size, font-style, font-weight, text-anchor, text-decoration, dominant-baseline, transform textPath unsupported; CDATA unwrapped; namespaced kids (e.g. Visio v:) stripped
title id  
use id, href, xlink:href, x, y, width, height, transform Inlines referenced content; symbol/svg viewBox mapped into width/height

Pending Tag Types

Tag Properties
radialGradient id, style, cx, cy, r, fx, fy, gradientUnits, gradientTransform, spreadMethod, xlink:href

Implemented Style Attributes

background-color
color
fill
fill-opacity
fill-rule
opacity
stroke
stroke-width
stroke-linecap
stroke-linejoin
stroke-opacity
stroke-dasharray (mapped to common TPenStyle patterns)
display (none skips element and whole subtree under <g&gt;; child display:inline cannot override)
visibility (hidden/collapse skips element)
stop-color (via linearGradient)
stop-opacity (via CheckFillForDefine)
clip-path (rect clipPath on element or <g&gt;; not inherited)

Pending Style Attributes

clip-rule
overflow
stroke-dashoffset
stroke-miterlimit

Implemented Font Attributes

font-family
font-size
font-weight
font-style
dominant-baseline
text-anchor
text-decoration (underline only)

Pending Font Attributes

font-variant
font-stretch
font
letter-spacing
Word-spacing
writing-mode
alignment-baseline
baseline-shift
line-height

Demo

Demo  Demos\InputOutput\SVGParsing\SVGParsing.dpr

See Also

ParseSVG
AsSVG