You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Denis Weerasiri <dd...@gmail.com> on 2009/02/19 18:30:45 UTC
Define coordinates for a element
Hi,
I generate a diagram(SVG) using Batik. And after generate it I need to add
icons-like SVG images to that diagram. I generated those icons using an SVG
export plugin in Adobe Illustrator.
Sample is as follows.
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version:
6.00 Build 51448) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "
http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.1" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;"
width="16.234" height="17.241"
viewBox="0 0 16.234 17.241" overflow="visible" enable-background="new 0
0 16.234 17.241" xml:space="preserve">
<g>
<g>
<g>
<line fill="none" x1="4.012" y1="12.166" x2="6.897"
y2="10.604"/>
<path fill="#0DB14B"
d="M3.215,13.374c0.961-0.521,1.923-1.041,2.885-1.562c0.468-0.254,0.864-1.027,1.144-1.452
c0.059-0.089,0.587-1.038,0.45-0.963c-0.961,0.521-1.923,1.041-2.885,1.561c-0.468,0.254-0.864,1.027-1.144,1.452
C3.606,12.499,3.078,13.448,3.215,13.374L3.215,13.374z"/>
</g>
</g>
</g>
</svg>
How can I add this to my diagram.?
I tried to add the root element <g/> element. It worked. But I can't give
the coordination for that <g/> element.
Please help me on this case.
Best regards,
Denis
Re: Define coordinates for a element
Posted by th...@kodak.com.
Hi Denis,
Denis Weerasiri <dd...@gmail.com> wrote on 02/19/2009 12:30:45 PM:
> How can I add this to my diagram.?
> I tried to add the root element <g/> element. It worked.
This is the right way to add the content I think.
> But I can't give the coordination for that <g/> element.
Please check the 'transform' attribute of SVG.
In particular the "translate" syntax that it uses I think
will allow you to do what you want.