Computer Science Canada Applet Repaint Issues |
Author: | smaxd [ Fri Mar 02, 2012 7:07 pm ] | ||
Post subject: | Applet Repaint Issues | ||
When I translate this shape the graphics object doesn't clear the last frame of said shape. Im trying to make that one shape move, not a line. Im not sure on how to stop this bug from happening, any help would be greatly appreciated.
|
Author: | [Gandalf] [ Fri Mar 02, 2012 8:46 pm ] |
Post subject: | RE:Applet Repaint Issues |
Well that's what you're telling it to do. In order to clear the shape from the last frame, you have to erase it. Usually what you do is at the start of the frame, you fill the background however you want, which will erase anything from the previous frame. Then you redraw your scene. Once you do this, you'll start noticing flickering. That's when you look up double buffering. ![]() |