You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Дмитрий <ol...@gorodok.net> on 2006/06/21 19:57:40 UTC

Java2D Shape From SVG File.

Hi.

I need to receive for each object in SVG its file bounding 
box.
Can anybody tell to me as to receive Java2D Shape's from 
existing SVG a file?

Thanks in advance.

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


Re: Java2D Shape From SVG File.

Posted by Andreas Neumann <ne...@karto.baug.ethz.ch>.
Hi,

can you define "file bounding box"? I don't know this term. Do you mean 
the bounding box of all elements in a file?

In the SVG DOM there is a method called .getBBox() that you can call on 
any graphics or group element. It returns a SVGRect object with .x .y 
.width and .height properties. This bounding box does not take into 
account stroke-width, though.

I don't know if that is what you need.

Andreas

Дмитрий wrote:

> Hi.
>
> I need to receive for each object in SVG its file bounding box.
> Can anybody tell to me as to receive Java2D Shape's from existing SVG 
> a file?
>
> Thanks in advance.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>


-- 
----------------------------------------------
Andreas Neumann
Institute of Cartography
ETH Zurich
Wolfgang-Paulistrasse 15
CH-8093  Zurich, Switzerland

Phone: ++41-44-633 3031, Fax: ++41-44-633 1153
e-mail: neumann@karto.baug.ethz.ch
www: http://www.carto.net/neumann/
SVG.Open: http://www.svgopen.org/
Carto.net: http://www.carto.net/


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