Hi,

.getTotalLength() is your friend when having to find out the total path length.

.getPointAtLength() is a way to get the coordinates at a certain length from 
the origin. This 
way you could equally space elements along the path.

Both methods are implemented in ASV3, ASV6 and Batik. I don't think they are 
currently 
implemented in MozillaSVG.

I use these methods also for calculating profiles along the line. With 
.getPointAtLength() I 
get the coordinates along the line, equally spaced, to calculate elevation 
values.

As to the SMIL question: currently there is no way to ask a SMIL animated 
element where it 
is. Unfortunately not.

Andreas

--- In [email protected], "ddailey" <[EMAIL PROTECTED]> wrote:
> Jeroen's question "Is it possible to repeat the streetnames on the path when 
> you have long
> streets?" reminds me of something I haven't been able to figure out:
> 
> How long is a path and where does it go? The renderer must know.
> 
> If I have a path, lets say like <path d="M 10 150 C 200 80 300 300 350 100"
> stroke="black" fill="none" stroke-width="5" />
> 
> Suppose I'd like to put objects (like traffic lights) spaced along the path 
> at some intervals -- how then to know where the path actually is in x,y 
> coordinates. I didn't want (because of laziness and it's hard work) to have 
> to calculate points on the bezier curve -- the rendering engine has already 
> done that for me when it drew the curve. So I thought: hmmm... maybe I could 
> run an invisible SMIL animation along the curve and then ask where the 
> animated thing is at time t -- sort of a Heisenberg uncertainty approach. 
> Anyhow, this just suggested to me another question I don't know the answer 
> to:
> 
> if I've moved an object around a lot as with an animation, can I ask where 
> it is now? Suppose I've rotated groups and objects and viewports and so 
> forth and I now want to ask where is something on the screen in some 
> absolute sense,  how do I do that? This reminds me of yet another unanswered 
> question that rightfully deserves its own thread which I will start in a 
> moment. I'm new to this group and haven't had a chance to adapt to its 
> unique ambience so apologies if I ramble, just let me know and I'll adapt 
> albeit slowly.
> 
> DD
> 
> ----- Original Message ----- 
> From: "Jeroen Vanattenhoven" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Tuesday, October 04, 2005 4:02 PM
> Subject: Re: [svg-developers] Re: Streetnames text problem
> 
> 
> > ok, thanks Andreas: so I will need to do some preprocessing to achieve
> > that. I need preprocessing anyway so that won't be a problem.
> >
> > Is it possible to repeat the streetnames on the path when you have long
> > streets?
> >
> > And Andreas, I have another question for you: I tried ogis2svg.exe on
> > your website. It works great, but I have a problem with using
> > --referenceframe. How do I write the minx miny maxy may attributes on
> > the commandline? I've tried several possibilities but all failed. The
> > idea for the referenceframe is that the shape/svg is clipped? Or does it
> > just adjust the viewBox? The latter would be useless in my case since it
> > makes the file way to big. (I'm clipping a city out of a province, so I
> > don't need the whole province).
> >
> > Regards,
> >
> > Jeroen
> >
> > Andreas Neumann schreef:
> >
> >>Hi Jeroen,
> >>
> >>Thats exactly the reason why all www.carto.net SVG mapping examples don't 
> >>use the
> >>mirror transform, but we multiply the y-values by -1. This way the text 
> >>elements can be
> >>rendered correctly.
> >>
> >>Andreas
> >>
> >>--- In [email protected], Jeroen Vanattenhoven
> >><[EMAIL PROTECTED]> wrote:
> >>
> >>
> >>>Hello,
> >>>
> >>>I've included streetnames for my map. I just put them on the path of the
> >>>street which work very nicely. The problem is that with real coördinates
> >>>the Y-axis points up and for SVG points down. My whole map has a
> >>>transform="scale(1,-1)" attribute which makes my map look correct and
> >>>not upside down.
> >>>
> >>>When I want to display my text now, it is shown at the correct position,
> >>>but is shown mirrored. If I put my text outside the element with
> >>>scale(1,-1), the text isn't mirrored, but it is shown at the wrong
> >>>position.
> >>>
> >>>Any thoughs?
> >>>
> >>>Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
> >>>
> >>>
> >>
> >>
> >>
> >>
> >>
> >>-----
> >>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
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >
> > -- 
> > No virus found in this outgoing message.
> > Checked by AVG Anti-Virus.
> > Version: 7.0.344 / Virus Database: 267.11.10/119 - Release Date: 4/10/2005
> >
> >
> >
> >
> > -----
> > 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
> >
> >
> >
> >
> >
> >
> >
> >




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/1U_rlB/TM
--------------------------------------------------------------------~-> 

-----
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/

<*> 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