Thanks Urs,
yes, thats the way. It works fine.
If you have at minimum a instanceof SVGGraphicsElement, you can get position
and size via getBBox() / getX() etc.
Maik
----- Original Message ----- 
From: "Urs Reupke" <[EMAIL PROTECTED]>
To: "Batik Users" <[EMAIL PROTECTED]>
Sent: Tuesday, October 26, 2004 2:54 PM
Subject: Re: how to get position and size of a SVG group


> Hi,
>
> >I  got a group ( <g> ) by ID from a document and want to know the
position
> > and size of the group.
> > With 'position' I mean the upper left corner of an imaginary rectangle
> > arround all elements of the group. 'Size' should be the edge length of
the
> > rectangle...
>
> I've thought about this myself, recently, and though I have not tested
this,
> I figured the easiest way would be to get the bounding box of the
> g-element by calling "getBBox()" and afterwards checking the respective
> parameters of that bounding box via getX(), getY(), getWidth() and
getHeight().
>
> As I said, it's untested, but I hope it works - if it doesn't, please post
your
> solution to the ML.
>
> Bye
> -Urs
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to