Nick Hebner:
> I initially went with GVT just because I was following the GVT builder
> tutorial. Later, I found the PathLength class that operated on Shape
> objects. Is there a PathLength analogue for DOM or is GVT better in this
> case?

Depends on what you want to do with the PathLength.  If you want to
perform a get-point-at-distance-along on a <path> element, then you can
do:

  SVGPathElement pathElt = …;
  SVGPoint p = pathElt.getPointAtLength(12.34);

>From the SVG DOM you can’t get the tangent at a point, or approximate
the path by straight line segments, though.

But either way, you need to have the GVT tree built because
getPointAtLength() will just internally call the method on PathLength,
which needs the rendering tree.

-- 
Cameron McCormack ≝ http://mcc.id.au/

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org

Reply via email to