Clearing a Canvas -- Pleeez help!

Brendan Kehoe kehoe at scotty.dccs.upenn.edu
Tue Oct 2 02:02:57 AEST 1990


I'm working on a program that's drawing and redrawing a function onto a
pixwin on a canvas in SunView. I can do it once fine; but what I really
want to do is draw it, let it stay there for a fraction of a second, then
erase it and draw a new one. It's drawn on a set of axis that should never
change.  Any ideas? I've been trying to think of a way to draw it. I came
up with an idea using 3 drawing surfaces:

	surface A has the axis by itself
	surface B is the one we'll show them
	surface C is the work surface

I'd copy the axis to B, then put B up for viewing. Then I'd copy A to C,
draw the function on C, then copy C to B. This would then repeat, but not
so quickly that it'd blur by -- it's a faked animation of sorts. I figured
that some sort of fast memory block copy might do the job.

So what I need is some suggestions on doing this -- clearing the canvas's
display, trying to swap the pictures like this, and any problems ya think
I may come upon. I've flown through the manual and haven't been able to
find anything yet ... right now I'm even working without it (it's back at
the lab, I'm here at work).

This is kind of time-sensitive ... I'll appreciate any
info/suggestions/etc at all.

  Thanks!

Brendan Kehoe | Soon: brendan at cs.widener.edu [ Oct 16 they say; tune in & see ]
 For now: kehoe at scotty.dccs.upenn.edu | Also: brendan.kehoe at cyber.widener.edu
   "I've tried to forget you, but my Calvins won't let me."   "Oh PuhLEEZ."



More information about the Comp.sys.sun mailing list