Not a stupid question! This is my first graphics app (in the corporate world I mainly do meat and potatoes database programming) and first java app of any real size that I've done outside the context of school.
My current redraw strategy is to iterate the linkedlist in the paint method and pass the getBounds method of each element into the hitClip method of the graphics object to determine if I need to draw it. By offscreen buffering do you mean am I using the default double buffering capability built into Java2D? I still have doublebuffering enabled at the moment but have considered turning it off to see what speed improvements might turn up.
Other than that I'm not doing any offscreen buffering. I have seen reference to a volatile offscreen buffer class that would use directdraw for acceleration on Windows platforms but I haven't investigated this yet.
If there's something I should be doing that I'm not just let me know and I'll get to work on it right away! I have no ego when I know I'm just learning a subject!
What I'm thinking would help speed things up is to create a cached bitmap in each element of the rendered vector image and blit that to the screen instead of rendering a general path. I could send a signal to the model (which contains all the elements) whenever I rescale the image that would trigger a re-rendering of the vector image into an updated bitmap. Does this sound like a strategy that would lead to any performance gains?
Thanks!
Will
Irving Salisbury III wrote:
This may sound like a stupid question, but are you using offscreen buffering?
Irv
William M. Wise wrote:
I'm developing a specialized diagramming application that uses a linked list of elements (lines, circles, boxes, fractals, specialized symbols, etc..) to render maps.
With lots of elements added the application starts to slow down pretty dramatically (as one might imagine) so my question is...
...would I see a significant performance increase if I render the elements using java2d draw functions when the elements are created and then cache them as bitmaps and blit them when they're needed on screen. The average element size on screen is 20x20 pixel.
I guess the question comes down to is the bit blit function quicker for drawing lots of small elements on screen than using java2d draw commands to render the same small elemnent using a GeneralPath?
Thanks for any help you can provide!
Will
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA2D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
=========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA2D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
