Anna Beth Fox wrote:

>Does the SVG spec currently support the notion of placing an object 
from the "offset" of another object as the current implementation of 
one of our applications relies heavily on this concept? We are looking 
at moving from an in-house format to SVG for B2B purposes. In 
particular, if we have a polyline, say 812 units long, does SVG support 
placing a symbol (such as a circle), say 167 units along the polyline 
from the starting point? And what if the polyline is bendy? If this is 
possible, then how and a link to an online resource would be great?


Yes it does (and at least IE/ASV, FF, and Opera implement it): using 
getPointAtLength (and the associated getTotalLength). If 

<path id="P" d="..."> then this JavaScript will find a point halfway along the 
path, based on its length:

Path=document.getElementById("P")

var Length=Path.getTotalLength()

var halfLength=Length/2

Mid=Path.getPointAtLength(halfLength)

plotPoint(Mid.x,Mid.y); 

            //where plotPoint is a function that draws, say, an ellipse at 
(P.x, P.y)

It saves the developer a whole boatload of work.

David

[Non-text portions of this message have been removed]



-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
---- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/svg-developers/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to