You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by hi...@xiphostec.com on 2013/02/17 12:18:43 UTC
Need Help on SVG file
Hi Sir ,
After converting PDF to SVG files, trying to read the SVG file data from Apache Batik.
According to our requirement ,I just want to know about the following points .
1)How can i Compare the different paths data for identify if they reside in the same area coordinates
or different area coordinates
Kindly let me know for any clarification.
Thanks & Regards
Himanshu
kolkata
Re: Need Help on SVG file
Posted by DeWeese Thomas <th...@gmail.com>.
Hi Himanshu,
This isn't trivial because you need to apply all of the intervening transforms between the two paths.
There are methods that help with this in the SVG DOM (see getTransformToElement) but you will also need to dig into things a bit deeper to get the Java2D paths so you can transform them to the other element's coordinate system. Even then it's a little unclear what "in the same area coordinates" mean, for anything other than simple geometry (rectangle/circle) this is a hard problem.
Thomas
http://stackoverflow.com/questions/5891552/more-usage-of-gettransformtoelement
On Feb 17, 2013, at 6:18 AM, himanshu.agrawal@xiphostec.com wrote:
> Hi Sir ,
>
> After converting PDF to SVG files, trying to read the SVG file data from Apache Batik.
> According to our requirement ,I just want to know about the following points .
>
> 1)How can i Compare the different paths data for identify if they reside in the same area coordinates
> or different area coordinates
>
> Kindly let me know for any clarification.
>
> Thanks & Regards
> Himanshu
> kolkata