Hi,
I have been unable to confirm whether version 2 supports importing SVG files that use graphics defined in the <defs> section of the file and then reference them in the actual content via the <use> tag. This is not supported in version 1.7.
Hi,
I have been unable to confirm whether version 2 supports importing SVG files that use graphics defined in the <defs> section of the file and then reference them in the actual content via the <use> tag. This is not supported in version 1.7.
I whipped together a simple SVG to check. It has a background rectangle, three concentric circles (made the “normal” way), and “OK” stacked twice to the right (made with <def>,<symbol>, and <use>). I’ve attached three files:
Looks like that’s a no on <use>. Also, the forums apparently don’t like the SVG either, so I’ve pasted it as preformatted text with the < replaced with ( and the > replaced with ). Copy it, paste into a text editor, and replace all the parentheses with angled brackets to reconstitute it.

(svg width="100" height="50")
(defs)
(symbol id='OK')
(circle id="O" cx="-13" cy="12.5" r="12.5" /)
(path id="K" d="m 0,0 v 25 H 5 V 12.5 L 17.5,25 H 25 L 12.5,12.5 25,0 H 17.5 L 5,12.5 V 0 Z" /)
(/symbol)
(/defs)
(rect id="background" x="0" y="0" width="100" height="50" fill="beige" /)
(circle id="circle1" cx="25" cy="25" r="24" fill="red" /)
(circle id="circle2" cx="25" cy="25" r="16" fill="blue" /)
(circle id="circle3" cx="25" cy="25" r="8" fill="green" /)
(use href="#OK" x="75" y="0" fill="green" /)
(use href="#OK" x="75" y="25" fill="cyan" /)
(/svg)
Thanks for trying it in the version 2 ![]()
Seems like I will have to code it in another way ![]()
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.