home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / dev / e / EasyGUI_v33b2.lha / Src / Tools / ghost.e < prev    next >
Text File  |  1996-12-04  |  745b  |  33 lines

  1. OPT MODULE, PREPROCESS
  2. OPT EXPORT
  3.  
  4. MODULE 'graphics/gfxmacros', 'graphics/rastport',
  5.        'intuition/intuition', 'intuition/gadgetclass'
  6.  
  7. PROC ghost(win:PTR TO window,x,y,xs,ys)
  8.   DEF apen, afpt, afptsz, drmd, r:PTR TO rastport
  9.   r:=win.rport
  10.   apen:=r.fgpen
  11.   SetAPen(r,1)
  12.   afpt:=r.areaptrn;  afptsz:=r.areaptsz
  13.   SetAfPt(r,[$1111,$4444]:INT,1)
  14.   drmd:=r.drawmode
  15.   SetDrMd(r,RP_JAM1)
  16.   RectFill(r,x,y,x+xs-1,y+ys-1)
  17.   SetAPen(r,apen)
  18.   SetAfPt(r,afpt,afptsz)
  19.   SetDrMd(r,drmd)
  20. ENDPROC
  21.  
  22. PROC unghost(gad,win) IS RefreshGList(gad,win,NIL,1)
  23.  
  24. PROC unghost_clear(gad,win,x,y,xs,ys)
  25.   clear(win,x,y,xs,ys)
  26.   unghost(gad,win)
  27. ENDPROC
  28.  
  29. PROC clear(win:PTR TO window,x,y,xs,ys)
  30.   SetAPen(win.rport,0)
  31.   RectFill(win.rport,x,y,x+xs-1,y+ys-1)
  32. ENDPROC
  33.