Hello all. I’m having an intermittent problem with my application that uses a JSVGCanvas, where occasionally an element isn’t painted. The application is a diagram editor, and the problem usually shows up when I am dragging a shape around on the editing canvas. The shape is sometimes painted and sometimes not, during dragging. Other SVG elements (handles for the shape) are painted over where the shape should be, so I suspect it isn’t a problem with the renderer classes.
While in a state where the shape isn’t painted, I dumped the SVG to a file and loaded it in Squiggle to verify that I was modifying the DOM correctly. I also added assertions to all of the public mutating methods in the org.apache.batik.dom.Abstract* classes to ensure that all invocations were done in the UpdateManager’s thread. Also, when I got into that state, I tried forcing a repaint of the JSVGCanvas itself with paintImmediately() to no avail. (I’ve turned off double buffering of the canvas while testing.) I guess the GVT is being built with the right geometry, since I can mouse over where the shape should be and the cursor changes (since I have a cursor="move" on the <g> that makes up the shape). The ShapeNode itself also does seem to have a ShapePainter with the right fill and stroke. I haven’t investigated any more of the GVT yet though to see if anything else is preventing the shape from being painted. Are there anything else obvious I should check for (perhaps some other threading requirements I’m not aware of) before I start tracing from GraphicsNode.paint() to see what’s going on? And what’s the easiest way to force the GVT to be repainted to the canvas’ offscreen buffer and then on to the component itself, without forcing a GVT rebuild (so I can verify whether the GVT was built correctly)? Thanks, Cameron -- Cameron McCormack ≝ http://mcc.id.au/ --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
