Re: Convert path arcs to cubic splines?

Hi Thomas,

I have looked at Batik.  They deal with th eproblem by implementing a 
completely new general path that uses actual arcs to draw the arcs.  
(GerenalPath is frusteratingly declared final)  This is quite a bit 
different from converting arcs to splines.  From what I remember, 
ExtendedGeneralPath also has a whole lot of dependancies.  I'd prefer to 
simply come up with the arc/spline aproximation if I can.

Also, this is for my SVG Salamander viewer, which does a lot of what 
Batik does, plus animation.   Everything is in place for paths except 
for arcs.  http://svgsalamader.java.dev.net.

Mark McKay



Thomas DeWeese wrote:

> Hi Mark,
>
>    You might want to look at the Apache Batik project:
>     http://xml.apache.org/batik
>
>    It includes a class called 'ExtendedGeneralPath' that
> wraps a standard GeneralPath and supports all of the SVG
> draw commands.  Batik also includes a parser for the
> path syntax which might be helpful.  In general if you want
> to do something with SVG in Java you should look carefully
> at Batik.
>
> http://svn.apache.org/viewcvs.cgi/xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/geom/ 
>
>

Received on Saturday, 6 August 2005 17:59:56 UTC