xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Jacobson <jacobson.mar...@gmail.com>
Subject Re: Symbol Bbox
Date Wed, 17 Feb 2010 12:09:22 GMT
Hi,
Here's some code...

Element el; // I am iterating through my elements

SVGRect bb = null;
String elementTag = el.getNodeName();
if (elementTag.equals("use"))
{
	bb = ((SVGOMUseElement) el).getBBox();
}

This works for me, but you must ensure that the document has been
rendered, or getBBoc() returns null.

HTH
Martin

On 17 February 2010 11:40, mistercaste <mistercaste@gmail.com> wrote:
>
> Hi
> I need to get the bounding box of an SVG element which is a Symbol.
> I've already tried with
>
> - SVGLocatableSupport.getBbox(element)
> - ((SVGGraphicsElement)element).getBBox()
>
> ..but it don't seem to work. How can I do to get the bbox? Thanks
>
>
> --
> View this message in context: http://old.nabble.com/Symbol-Bbox-tp27622473p27622473.html
> Sent from the Batik - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>
>



-- 
>From my MacBook Pro

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


Mime
View raw message