aaaa aaaa:
> the problem is that I get occasionally a NullPointerException in the
> ScrollListener of the JSVGCanvas. The variable "newview" is null in
> the updateCompleted method .

Hmm.  I’m not sure what would cause getViewBoxRect() to return null if
all you are doing is resizing, unless there’s a threading issue.

> Rectangle2D newview = getViewBoxRect();
> 
> So sometimes the canvas gets white and it has to be repaint. It's
> immediatly repainted when I resize the frame or when I'm using the
> scrollbars. But I've inserted
>
> if (newview == null) {
>                               
> canvas.getUpdateManager().getUpdateRunnableQueue().invokeLater(new Runnable() 
> {
> 
>                                       @Override
>                                       public void run() {
>                                               canvas.repaint();
>                                       }
> 
>                               });
>                               return;
>                       }
> 
> and this does not have any effect. Another solution maybe would be to
> avoid to get the Exception. But I don't see what I'm doing wrong.

I don’t think calling canvas.repaint() is the right thing to fix the
problem.  It sounds like there is a problem with JSVGScrollPane or
JSVGCanvas.  Are you able to provide a reduced test case that
demonstrates the problem (perhaps just loading a small SVG document in a
JSVGScrollPane/JSVGCanvas, where continually resizing it will trigger
the bug)?

Thanks,

Cameron

-- 
Cameron McCormack ≝ http://mcc.id.au/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to