kimoa / svg-edit

Automatically exported from code.google.com/p/svg-edit
MIT License
3 stars 0 forks source link

External symbols include with tag "use" #912

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

I would like to include simbols from external file addressed by IRI

Example

<use xlink:href="mySymbolLib.svg#symbol1", x= 20, y= 40, id=svg-xx>

Original issue reported on code.google.com by teguisej...@gmail.com on 25 Feb 2012 at 7:08

GoogleCodeExporter commented 8 years ago
Example case:

mySymbolL.svg --->

<title>Symbols Library/title>
<desc>Use</desc>

<defs>
<g id="octagon" style="stroke: black;">
    <desc>Octagon as group</desc>
    <polygon points="
        36 25, 25 36, 11 36, 0 25,
        0 11, 11 0, 25 0, 36 11"/>
</g>

<symbol id="sym-octagon" style="stroke: black;"
   preserveAspectRatio="xMidYMid slice" viewBox="0 0 60 60">
    <desc>Octagon as symbol</desc>
    <polygon points="
        36 25, 25 36, 11 36, 0 25,
        0 11, 11 0, 25 0, 36 11"/>
</symbol>
<symbol id="sym-octagon-green" style="fill: green;"
   preserveAspectRatio="xMidYMid slice" viewBox="0 0 60 60">
    <desc>Octagon as symbol</desc>
    <polygon points="
        36 25, 25 36, 11 36, 0 25,
        0 11, 11 0, 25 0, 36 11"/>
</symbol>
</defs>
</svg>

mySample.svg  --->

<?xml version="1.0" encoding="UTF-8"?>
<svg
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:xlink="http://www.w3.org/1999/xlink"
   width="200px"
   height="200px"
   viewBox="0 0 200 200"
   version="1.1">
<title>mySample using mySymbolL.svg</title>
<desc>Use with external symbols</desc>

<g>

<use xlink:href="mySymbolL.svg#octagon" x="40" y="40" width="30" height="30" 
style="fill:#cc0000;" id="octagon"/>
<use xlink:href="mySymbolL.svg#sym-octagon-green" x="80" y="80" width="40" 
height="60" id="sym-octagon-green"/>
</g>
</svg>

Original comment by teguisej...@gmail.com on 25 Feb 2012 at 8:28

GoogleCodeExporter commented 8 years ago
This is a rather important/symbolic Issue because Svg-Edit doesn't support the 
svg logo (http://www.w3.org/Icons/SVG/svg-logo-v.svg)!
This is my test with the logo:
Figure 1 is how it looks like when "Import image" is used.
Figure 2 is how it looks like when "Open image" is used.

Original comment by josegaert on 28 Mar 2013 at 11:51

Attachments: