Re: path and direction

> I appreciate that SVG paths can be defined just once in the <defs>
> element and then reused in rendering the paths, labeling the paths,

you can also re-use elements outside the <defs> section. The only difference is,
that elements in the <defs> section are not rendered initially, only their
instances (<use>-elements)

> and
> defining animation traversing the paths.  I've just started to
> seriously
> delve into SVG and I'm beginning to think that I'll need to duplicate
> the path definitions: one for each direction.  There are cases when
> <textPath> requires the path in one direction in order for the text to
> appear on the preferred side of the path, but <mpath> requires the
> path
> in the other direction for animating a shortest path solution.  Does
> SVG
> 1.1 have some path direction control that I've overlooked?

Unfortunately not. I would also have a lot of use-cases for the inverse of a
path-direction.

Please make a SVG 1.2 feature request for that (separate email on this list) and
show them, that I am not the only one that has a use for it.

Also, please list use-cases, where you would need the ability to inverse the
path-direction.

I would see:

* animation along a path
* directed markers
* text on path

Direction of path matters in
* maps
* flowcharts
* orgcharts
* circuit diagrams

In interactive situations we should be able to change them using DOM methods or
XML attributes.

So, please do a official SVG1.2 feature request on that list and you are welcome
to add my above comments.

Meanwhile you have to inverse the path-data yourself using javascript. Kevin
Lindseys path-parser might help you:

http://www.kevlindev.com/dom/path_parser/index.htm

If you ask him friendly, maybe he adds a method to inverse the path string.
Otherwise you could do it yourself and give the code back to Kevin.

Andreas

--
How many worries simply flow away when you decide
to be somebody instead of just something ...
-- Coco Chanel

----------------------------------------------
Andreas Neumann - Department of Cartography
Swiss Federal Institute of Technology (ETH)
ETH Hoenggerberg, CH-8093  Zurich, Switzerland
Phone: ++41-1-633 3031, Fax: ++41-1-633 1153
e-mail: neumann@karto.baug.ethz.ch
www: http://www.karto.ethz.ch/neumann/
SVG.Open: http://www.svgopen.org/
Carto.net: http://www.carto.net/

Received on Wednesday, 4 February 2004 23:12:05 UTC