Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

popupwin.c

Go to the documentation of this file.
00001 /*************************************************************************
00002 *   FILE: popupwin.c
00003 * AUTHOR: CAL
00004 * DATE: 25 April 1993
00005 * PURPOSE:
00006 *   Pop-up windows "memorize" the image which they overwrite when
00007 *   they are drawn, and restore the image when they are erased.
00008 **************************************************************************/
00009 
00010 #include "popupwin.h"
00011 #include <stdlib.h>
00012 #include <assert.h>
00013 
00014 
00015 void PopUpWin::PrepScreen (void)
00016 {
00017   if (!buffer)
00018   {
00019     buffer = (void *) new byte [imagesize (0, 0, XDim, YDim)];
00020     assert (buffer != NULL);
00021   }
00022   Disp->GetImage (X, Y, X+XDim, Y+YDim, buffer);
00023 }
00024 
00025 
00026 void PopUpWin::Erase (void)
00027 {
00028   assert (Disp != NULL);
00029   if (Drawn)
00030   {
00031     ClientD->Erase ();
00032     Disp->PutImage (X, Y, buffer, COPY_PUT);
00033     Drawn = False;
00034   }
00035 }
00036 

Generated on Sun Jul 6 23:07:16 2003 for Scotland Yard by doxygen1.2.15