Re: [JAVA2D] getting pixel color information from a rectangle inside a Panel

2006-03-27 Thread Chet Haase
Seems like you want some buffer that holds the contents of the graph without your red node on it. Then prior to drawing the new location of the red node, you can simply copy in the contents from the buffer in the area affected by the last rendering of the red node. This will effectively erase

Re: [JAVA2D] getting pixel color information from a rectangle inside a Panel

2006-03-27 Thread Jim Graham
Depending on the complexity of your drawing, simply rerendering the scene with the objects in the new position (with double buffering) may work well for 10 frames/second performance. Switch to using Swing with a JPanel (you'll have to override paintComponent instead of paint) and call repaint()