xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thomas.dewe...@kodak.com
Subject Re: Map with overlapping Elements
Date Tue, 28 Sep 2010 22:36:34 GMT
Hi Muller,

"Müller Clemens" <pangratz666@gmail.com> wrote on 09/07/2010 10:11:35 AM:

> The problem is that I can't get the correct bounding box, depending 
> on the current position of the elements. What I'm trying to get is 
> the bounding box of each element in relation to the root SVG. Do you
> know how I can achieve my goal or do you know how to implement such 
> a feature??

        You can use getScreenCTM in Batik to get the affine transform from
any element to the screen coordinate system.  You could alternately use
getTransformToElement with the root SVG Element to get the affine 
to the local coordinate system of the root SVG Element.

        Once you have the affine transform you can use it to transform the
corners of the bbox for an element to know it's bounds in the root SVG
element's coordinate system (or the screen coordinate system).

        Does that answer your question?

View raw message