473,378 Members | 1,078 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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 1259
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: VladimirVV | last post by:
Hello, Please, help to understand the problem: Let's create in Notepad simplest SVG 1.1 document: <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"...
27
by: Mark | last post by:
I'm curious to get feedback regarding the potential SVG has in performing the same functionality as PDF for fixing documents. Thanks. Mark
2
by: MiW | last post by:
Hi I'm making a kind of JavaScript-based library for creating SVG objects/elements. And I hit the wall... Every element (rect, circle etc.) can be created using *.createElement, then...
3
by: Roman Gordin | last post by:
Hi, I use SVG for web-GUI, but found some serious restrictions 8-( When I use HTML (dynamically generated from .php), I may use HTTPRequest object to provide dynamically regeneration some part...
61
by: phil-news-nospam | last post by:
Why does SVG need a different tag than other images? IMHO, SVG should be implemented as an image type just like any other image type, allowing it to work with <img> tags, and ... here is the...
3
by: SMH | last post by:
Normally an SVG document is loaded/parsed/interpreted inside an HTML document using an 'object' (or 'embed') element, although there are supposedly other ways too. The problem is, the SVG document...
7
by: C.W.Holeman II | last post by:
For info on the context of my question see the end of this posting. From http://www.w3.org/TR/XHTMLplusMathMLplusSVG/: How can I validate the result of client-side XSLT transform which has...
0
by: Holger Jeromin | last post by:
Hello, Note: this is a IE 6,7 and 8b1 only html example, my problem does not appear in other browsers with native svg support. For them i have a working valid "XHTML 1.1 plus MathML 2.0 plus SVG...
2
by: =?iso-8859-1?q?KLEIN_St=E9phane?= | last post by:
Hi, I've a xml svg file and I would like to update it with Python. First, I would like to fetch one dom node with getElementByID. I've one issue about this method. This is my example : ...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.