468,119 Members | 1,873 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,119 developers. It's quick & easy.

SVG: attributes relativ to other elements / special anchors ??

Hello,

I want to place two lines relative to another. The problem is, that
these two lines are in different groups.

Is there an possibility to set the x and y values of the second line
with the values of the first line + an offset.

Something like that for example:

<line id="line1" x1="100" y1="100" x2="200" y2="100"/>
<line id="line2" x1="100" y1=line1.x1+100 x2="200" y2=line1.x2+100/>

How can I resvole my problem? Do I have to use javascript, which sets
up the values for the second line??
Another question: Can I set some "certain anchors" in svg? I think
about this problem. There are two lines specified. Each line has an
"anchor". Now I want to set a line between these two anchors. The
advantage of that is, that i can mave the two lines without any
problem. The third line, which connects the two first lines will be
there everytime.

Any tips for that problem??
Thanks,
Pet

Jul 20 '05 #1
1 1118
Hi,

Tempore 15:58:44, die Friday 01 July 2005 AD, hinc in foro {comp.text.xml} scripsit Peter Jakobi <Pe****@yahoo.com>:
Is there an possibility to set the x and y values of the second line
with the values of the first line + an offset.

<line id="line1" x1="100" y1="100" x2="200" y2="100"/>
<line id="line2" x1="100" y1=line1.x1+100 x2="200" y2=line1.x2+100/>
why not use the 'use' element for this purpose?
e.g. <use xlink:href="#line1" x="100" y="100"/>
Do I have to use javascript, which sets up the values for the second line?? You could do that. In Javascript you have control over the complete DOM of your svg file.
Another question: Can I set some "certain anchors" in svg?

I do not think anchor points are (yet) defined in svg.
regards,
--
Joris Gillis (http://users.telenet.be/root-jg/me.html)
Ceterum censeo XML omnibus esse utendum
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by VladimirVV | last post: by
61 posts views Thread by phil-news-nospam | last post: by
7 posts views Thread by C.W.Holeman II | last post: by
reply views Thread by Holger Jeromin | last post: by
13 posts views Thread by didacticone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.