开发者

how can i draw many animated shapes on swt Canvas?

开发者 https://www.devze.com 2023-02-04 05:16 出处:网络
I am trying to draw many shapes on SWT canvas by iterating a list of shapes, paint them, set the new locations and redraw().

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

精彩评论

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