Hi,
ok, I now use the viewBox attribute. Since the exception wasn't always reproduceable I'll now use it as it is now for the next days. I hope this is the solution!
---
thomas.deweese@... <
thomas.deweese@...> schrieb am Sa, 31.5.2008:
> Von:
thomas.deweese@... <
thomas.deweese@...>
> Betreff: Re: Repainting a JSVGCanvas
> An:
batik-users@...
> CC:
batik-users@...
> Datum: Samstag, 31. Mai 2008, 14:24
> Hi Cameron, scorefande,
>
>
> Cameron McCormack <
cam@...> wrote on 05/31/2008
> 07:28:00 AM:
>
> > Are these changes being made in the UpdateManager’s
> thread? If not,
> > then it might explain the problem. See:
>
> Actually I think it's the JSVGScrollPane that is
> interacting
> with the graphics tree outside of the UpdateManager's
> thread.
> In particular updateCompleted is called in the Swing thread
> not
> the update manager's thread. However I don't think
> this is
> really the source of the problem, but it might be good to
> move at least all of the graphics node stuff in
> getViewBoxRect
> into a runnable that we dispatch to the UpdateManager
> thread.
>
> aaaa aaaa <
scorefande@...> wrote on 05/30/2008
> 07:03:47 AM:
>
> > I found out that when the Exception occurs
> "bounds" in the
> > getViewBoxRect method is null. That's why it
> returns null.
> >
> > Rectangle2D bounds = gn.getBounds();
>
> This happens when a rendering is interrupted. We
> should
> handle this more gracefully. I think the simplest thing
> would be to simply protect all the callers of
> getViewBoxRect()
> against a null return. I've put this in SVN.
>
> > Maybe this is part of the problem? What does
> getBounds() do?
>
> 'getBounds' calculates the smallest rectangle
> that encloses
> the contents of the graphics node it is called on. In
> this
> case it's trying to get the bounds of the document
> because
> you haven't provided a viewBox attribute. So your
> simplest
> fix would be to provide a viewBox attribute on the
> outermost
> SVG element. This is really a better solution anyway as
> the
> geometric bounds of the document is rarely the truly
> correct
> document bounds (often documents have oversized
> 'background rects'
> or they may want white space around the content, etc...).
__________________________________________________________
Gesendet von Yahoo! Mail.
Dem pfiffigeren Posteingang.
http://de.overview.mail.yahoo.com---------------------------------------------------------------------
To unsubscribe, e-mail:
batik-users-unsubscribe@...
For additional commands, e-mail:
batik-users-help@...