Robin Dunn wrote:
The key point is to draw the expensive things as few times as possible,
and that means drawing them to a bitmap and then just blitting thhe
bitmap.
This is exactly what FloatCanvas does -- you can put objects on the
background (the default), or the foreground. When something changes on
the foreground,the background is blitted, then the foreground objects
are re-drawn. This works well, as usually, there are only a few things
that are changing.
You may want to give FloatCanvas a try -- this is all done for you
already. It's not using GraphicsContext now, but you can write your own
DrawObjects that do use GraphicsContext if you want. Someone's put a
Wiki page up about this:
http://morticia.cs.dal.ca/FloatCanvas/wiki/SmoothLines
-Chris
···
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov