I have more feedback.  Even if the below-mentioned SVG snippet is saved in an SVG document, then loaded, the JSVGCanvas still does not render that rectangle representing the background.  The only way the white color shows through is when a dirty rectangle is subsequently repainted in the JSVGCanvas.  I still see the black color of the JSVGCanvas as opposed to the white color of the document.  Again, this is in Mac OS only.

 

Michael Bishop

 


From: Bishop, Michael W. CONTR J9C880 [mailto:[EMAIL PROTECTED]
Sent: Friday, October 21, 2005 9:13 AM
To: [email protected]
Subject: Repainting not happening properly with JSVGCanvas on Mac OS?

 

I’ve recently done some testing with my application on Mac OS.  I’ve seen some strange behavior with the “background” of my SVG document:

 

<rect x=”-1000%” y=”-1000%” fill=”rgb(255,255,255)” width=”3000%” id=”background” height=”3000%”/>

 

This is the “default” document that is seen when the application comes up.  The true background of my JSVGCanvas is black:

 

JSVGCanvas.setBackground(Color.BLACK);

 

The problem with Mac OS is that the application’s background is shown, but the document’s background is not.  So it appears the user is drawing to a black background.  The shapes that are drawn are “surrounded” by the white background both during the outlining on the glass pane and after they are rendered to the document, but I can’t get the white background to display on startup.  The white background is also lost when the window resizes.

 

In short, I only see the document’s background when “dirty” rectangles are updated in the JSVGCanvas.  I’ve tried manually calling repaint() on the JSVGCanvas when the window is resized and when the document has loaded (gvtRenderingCompleted()).

 

This is not an issue with the Windows operating system; it has only appeared on the Mac.

 

Michael Bishop

Reply via email to