重新绘制时,绘制的形状显得浮华和跳跃?
我制作了一个在 Windows 中绘制形状的小程序,然后在每一帧中,我让它们向下模拟基本重力,但形状闪烁很多(这是不需要的)而且我找不到一种方法使其平滑。我不介意平滑图形的轻微延迟。
I made an Applet that paints shapes in the Windows, then each frame, I make them go down to simulate Basic Gravity but the shape flashes alot ( Which is unwanted ) And I couldn't find a way to make it Smooth. I don't mind slight lag for Smooth Graphics.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来你即将发现双缓冲:
http://en.wikipedia.org/wiki/Multiple_buffering#Double_buffering_in_computer_graphics
获取实施帮助在爪哇中:
http://download.oracle.com/javase/tutorial/extra/fullscreen /doublebuf.html
Sounds like you're about to discover double buffering:
http://en.wikipedia.org/wiki/Multiple_buffering#Double_buffering_in_computer_graphics
For help implementing it in Java:
http://download.oracle.com/javase/tutorial/extra/fullscreen/doublebuf.html