This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Performance issue while painting on a Graphics2D

 
Steffen Reinhard
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all!

I wrote an Applet for demonstration purposes which includes 64 vectors moving away from a common starting point and rebounding from the surrounding walls, thus gradually filling the applet window and masking part of the underlying signal. The animation works all right but tends to get boringlymind-bogglingly slow after a couple of seconds, as the underlying thread has to draw 64 GeneralPaths consisting of virtually thousands of Line2D objects with every rendering of the BufferedImage.

Is there a way to bypass the cleaning of the bufferedImage so I would only have to render and draw the current line segment?

For the actual code see below:



To view the Applet itself see Hallradius-Demo

I'll be glad to receive any suggestion to improve the shameful performance of my Applet ...

Thanks in advance!

Cheers -


Steffen
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic