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 Nikhil Dinesh <ni...@seas.upenn.edu> on 2004/06/24 05:53:29 UTC
Re: your mail
On Wed, 23 Jun 2004, Nikhil Dinesh wrote:
> To use the JSVGScrollPane your SVG document should have a viewBox
> attribute on the outermost svg element. This is how it determines
> what the extents of the scroll bars should be. If you want you
> can load the SVG document yourself and add the viewBox attribute
> before giving the document to the canvas.
Yes that was it. Thanks.
>
> This should be documented and there should be better checking
> along with a better error message when the check fails (or it could
> default to the final 'computed' bounds of the SVG - although this
> can often be 'wrong'. Contributions are always welcome.
>
The canvas does not provide locatability support for ALWAYS_STATIC
documents. ie SVGRect rect =
canvas.getSVGDocument().getRootElement().getBBox() results in rect = null.
Is there another way to check the 'computed' bounds? If there is, then
case the default you suggest would be nice.
Thanks again Thomas and Tonny.
-Nikhil
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org
Re: your mail
Posted by Nikhil Dinesh <ni...@seas.upenn.edu>.
> Yes you can use the rendering tree directly:
>
> Rectangle2D bounds = canvas.getGraphicsNode().getBounds();
>
> BTW has performance improved with the JSVGScrollPane?
It definitely works better than the JScrollPane. More drag coalescing and
discarding pressed/click events on the bar itself would be great.
-Nikhil
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org
Re: your mail
Posted by Thomas DeWeese <Th...@Kodak.com>.
Thomas DeWeese wrote:
>> This should be documented and there should be better checking
>>along with a better error message when the check fails (or it could
>>default to the final 'computed' bounds of the SVG - although this
>>can often be 'wrong'. Contributions are always welcome.
Nikhil Dinesh wrote:
> The canvas does not provide locatability support for ALWAYS_STATIC
> documents. ie SVGRect rect =
> canvas.getSVGDocument().getRootElement().getBBox() results in rect = null.
> Is there another way to check the 'computed' bounds? If there is, then
> case the default you suggest would be nice.
Yes you can use the rendering tree directly:
Rectangle2D bounds = canvas.getGraphicsNode().getBounds();
BTW has performance improved with the JSVGScrollPane?
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org