xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maik Schürer proveo GmbH <Maik.Schue...@proveo.de>
Subject Re: how to get position and size of a SVG group
Date Tue, 26 Oct 2004 15:55:06 GMT
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" <ursreupke@gmx.net>
To: "Batik Users" <batik-users@xml.apache.org>
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: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Mime
View raw message