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 "Bishop, Michael W. CONTR J9C880" <Mi...@je.jfcom.mil> on 2005/10/21 15:13:04 UTC

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