[comp.sys.mac.programmer] Drawing to windows

cabruen@athena.mit.edu (Charles Alan Bruen) (02/20/91)

I just need advice from the more experienced Programmers out there.

How should I store the information I want drawn in a window. (I know how
to actually do it) IM suggests that you not draw to the screen directly
but save the information somehow (it fails to mention). 

Problem: In a window a have a plot of a function. I do all the
calculations as I draw the plot in the window. If I later get an update
event for that window, do I have to redo the calculations to redraw the
window. This seems like a big waste of effort.

What are the ways in which this is solved in the real world? Could I
draw to an imaginary Picture and just put that in the window everytime I
get an update?

Any and all suggestions welcome.

-Charles Bruen
 Aero/Astro MIT
 cabruen@athena.mit.edu