Declaration
property AsSVG: String;
Description
Returns the layer as an SVG tag, or allows the layer properties to be set using an SVG tag.
Note: To import an SVG file as layers, you can use
LayersImport
TIEImageLayer SVG Samples
<image x="20" y="20" height="94" width="313" href="http://www.imageen.com/graphics/ImageEnLogo.png" />
<image x="94px" y="201px" width="51px" height="33px" xlink:href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEBLAEsAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQO
DwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAAR
CAAhADMDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRol
JicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3
+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5
OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIR
AxEAPwD6pooPSvmX9r7x5rehXGjaFoV/c6elxG9zcS27GN352qoccgfeJA9qAPpSWaONWLyIuBzk9K+dfg5rvja81+e7v31W90l0IDzKxjPzdVJ6/hXI/s8fFnUIbHUdG1UrdzWsLXltMygzOi8yRlv4
uOQTz1GemPSfAfiiZPAuiQxu2Bb9M4/iP9KTjeSOqjW9nQqLlTvZa9N3p9x7A+sxRxBnilU4+64AIrO/4SmGOfFwqrETjcrZK/WvP7jVppupJ+tYesXExQ7WIBBJrSyOK7Pf45UkRXVgVIyKK4Lw5fTt
odkTI3+rHeioLPQDXx5+2qry+NfD8caFn+wtgLyT857V7T4uPjDS7+drXUL+8tHkLIls0UciIe3zRFTjpXEyeJvF1vqM062TXiNGIimt2atIAOyyQkDHsVp2Fc+d/hat3p+vX9wLeQSppl0Y1dDhj5ZG
PfrXuXw2kuH8EaQ13G0U3lsuxkKEAMQMg/5PFVxP4m1TxML+7srK3sUVglpZWzJhiODvbk/oPauu0rQPEGosClusCEDBfLtnvnt+VLQd3bl6f1/myYMAvJ4qhqEyOjxId8rKQqrzknj8K7jTPhvJJhtT
unkz1XPH5Diuw0zwlpdgBst1Zh3IoFY5/wAO2kq6HZK6MGEYBFFd6sSIoVUAA6cUUDM++6Gubvfvt9aKKAK0H+uFdnpf+pWiigC9RRRQAUUUUAf/2Q=="/>
TIEShapeLayer SVG Samples
<circle r="45" cx="450" cy="450" fill="red" stroke="green" stroke-width="3"/>
<ellipse rx="100" ry="50" cx="520" cy="180" style="fill:yellow;stroke:green;stroke-width:3"/>
<rect x="600" y="500" height="50" width="50" rx="5" ry="5" fill="red" stroke="green" stroke-width="3"/>
<rect x="10" y="520" height="110" width="200" style="fill:#666666;stroke:green;stroke-width:0"/>
TIELineLayer SVG Samples
<line x1="650" y1="650" x2="500" y2="550" style="stroke:red;stroke-width:2"/>
TIEPolylineLayer SVG Samples
<path d="M 10 80 Q 95 10 180 80" stroke="black" fill="white"/>
<polygon points="100,10 150,190 50,190" fill="lime" stroke="purple" stroke-width="3"/>
<polygon points="100,10 40,198 190,78 10,78 160,198" style="fill:lime;stroke:purple;stroke-width:5;fill-rule:evenodd;"/>
<polyline points="0,340 40,340 40,380 80,380 80,420 120,420 120,460" style="fill:yellow;stroke:red;stroke-width:4"/>
<path d="M550 280 l30 90 l-65 0 z" style="fill:pink;stroke:purple;stroke-width:3" opacity="0.60"/>
<path d="M550 205 L475 400 L625 400 Z" style="fill:lavender;stroke:purple;stroke-width:3" opacity="0.40"/>
TIETextLayer SVG Samples
<text x="400" y="80" font-family="Arial, Helvetica, sans-serif" font-size="24">This is SVG Text</text>
edtSVG.Text := ImageEnView1.LayersCurrent.AsSVG;
// Create a polyline layer using an SVG tag
ImageEnView1.LayersAdd( ielkPolyline );
polyLayer := TIEPolylineLayer( ImageEnView1.CurrentLayer );
polyLayer.AsSVG := '<path d="M 10,10 L 90,10 M 50,10 L 50,190 M 10,190 L 90,190" stroke="orange" stroke-width="30" fill="none" />';
ImageEnView1.Update();
// Create a curved polyline layer using an SVG tag
ImageEnView1.LayersAdd( ielkPolyline );
polyLayer := TIEPolylineLayer( ImageEnView1.CurrentLayer );
polyLayer.AsSVG := '<path d="M 70,30 C 130,-30 130,90 70,30 C 10,90 10,-30 70,30 Z" style="fill:yellow; stroke:green; stroke-width:3" />';
ImageEnView1.Update();
See Also
◼LayersImport
◼SVG Implementation Status