xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sujesh Babu N" <sujesh.wannabe.tec...@gmail.com>
Subject Converting elliptical Arc to Curve
Date Wed, 25 Oct 2006 12:17:35 GMT
Hi ,

I am a java developer new to Batik . I am working on an application , which
converts SVG to SVG tiny. SVG tiny wont support elliptical arc command . Is
there any function/mechanism available to convert elliptical arc to curve in
Batik ?

i am trying the following way ..
//getting the path data
String pathData = path.getAttribute("d");
ExtendedGeneralPath egp = null;
ExtendedGeneralPath newPath=new ExtendedGeneralPath();
try {
 //creating the path
 egp = (ExtendedGeneralPath) AWTPathProducer.createShape(
   new StringReader(pathData), 0);
} catch (ParseException e) {
 // TODO Auto-generated catch block
 e.printStackTrace();
} catch (IOException e) {
 // TODO Auto-generated catch block
 e.printStackTrace();
}
ExtendedPathIterator pathIterator = egp
  .getExtendedPathIterator();

// Iterating through the path
while (!pathIterator.isDone()) {
    // construct new path , on the way ,
    //try to convert elliptical arc to corresponding curve commands

}

any help will be appreciated , thanks in advance .

Best Regards
Sujesh

Mime
View raw message