开发者

how can i draw many animated shapes on swt Canvas?

I am trying to draw many shapes on SWT canvas by iterating a list of shapes, paint them, set the new locations and redraw(). This is too slow. wh开发者_JAVA技巧at am I doing wrong?


From this high level perspective there's no flaw. If you need more information you should provide

  • some distilled code (to detect programming flaws)
  • the expected frame rate (to detect expectation flaws)
  • the number of shapes (see above)


Some quick research on the internet revealed that using a for loop might be a bit faster. It depends on how many shapes do you have?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜