Can anyone suggest a method for identifying the source of a rendering error from the debugger?
Misko Hevery classifies errors in three categories:
It’s clear to me that my problem is a rendering error.
I have a Swing application with a panel that contains several layers. Rendering all layers can take a considerable amount of time, so the application uses a thread pool to render layers and fragments from layers in BufferedImages. When the time comes for the Dispatch event stream to render the panel, the most recently created BufferedImages are drawn on the screen.
This setup is done properly.
The new feature requires a certain type of layer to support transparency. Something, somewhere, transparency is not maintained. The error can be in several places, perhaps when implementing objects that will be visualized, maybe the error can be implemented in the offline rendering stream. It is possible that many BufferedImages are not merged correctly in the EDT rendering code.
I do not ask anyone to look at the code and tell me where the error is.
What I want to know is what people have found to be especially effective at fixing Graphics2D rendering problems.
I am a big proponent of unit tests, but I would prefer to start with a different technique.
Is there a method or trick for visually inspecting a BufferedImage or Graphics2D object from a debugger?
Netbeans Variables and Watches
Netbeans PropertyEditors . foregroundColor backgroundColor .
/ NetBeans PropertyEditor, BufferedImage?
, BufferedImages, , . , .
?