home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 9 / FreshFishVol9-CD2.bin / bbs / dev / visualarts-2.2.lha / VisualArts / Demos / Source / SuperBitMap / SuperBitmap_func.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-02  |  1.6 KB  |  71 lines

  1. /* C code generated by:                            */
  2. /* Visual Arts Version 2.1                        */
  3. /* Copyright (c)1994-95 Danny Y. Wong  All rights reserved        */
  4. /* Calgary, Alberta (CANADA)                                    */
  5.  
  6. int  InitTempArea(void);
  7. extern void SuperBitMapDrawCircles(struct Window *Wind);
  8. extern void SuperBitMapDrawRects(struct Window *Wind);
  9. extern struct Window  *SuperBitMapWnd;
  10. extern struct Gadget *SuperBitMapGadgets[SuperBitMapNumGads];
  11.  
  12. void SuperBitMapDrawRects(struct Window *Wind)
  13. {
  14.   UWORD offsetx = Scr->WBorLeft;
  15.   UWORD offsety = Scr->WBorTop + Scr->RastPort.TxHeight + 1;
  16.  
  17.   DrawFBox(Wind, 28, 9, 222, 97, 3, 0, 0, 20 );
  18.   DrawBevelBox(Wind->RPort, 27+offsetx, 8+offsety, 224, 99, 
  19.     (GT_VisualInfo), VisualInfo, (GTBB_Recessed), TRUE, TAG_DONE);
  20.   SetDrPt(Wind->RPort, 0xFFFF);
  21.   SetOPen(Wind->RPort, 0);
  22.   SetAfPt(Wind->RPort, NULL, 0);
  23. }
  24.  
  25. void SuperBitMapDrawCircles(struct Window *Wind)
  26. {
  27.   DrawFCircle(Wind, 318, 41, 30, 15, 2, 0, 1, 34 );
  28. }
  29.  
  30. void SuperBitMapDrawLine(struct Window *Wind)
  31. {
  32.   DrawLine(Wind, 278, 59, 361, 85, 1, 1 );
  33.   DrawLine(Wind, 272, 83, 361, 59, 3, 0 );
  34. }
  35.  
  36. struct AreaInfo areaInfo={0};
  37. struct TmpRas Temprast;
  38. PLANEPTR AreaPlane=NULL;
  39. WORD areaBuffer[4000];
  40.  
  41.  
  42. int InitTempArea(void)
  43. {
  44.   register UWORD i;
  45.  
  46.   for (i=0; i<4000; i++)
  47.     areaBuffer[i]=0;
  48.   InitArea(&areaInfo, areaBuffer, 800L);
  49.   AreaPlane = AllocRaster(640, 200);
  50.   if (AreaPlane == NULL)
  51.       return(1L);
  52.   InitTmpRas(&Temprast, AreaPlane, (long)RASSIZE(640, 200));
  53.       return(0L);
  54. }
  55.  
  56.  
  57.              /* gadget functions */
  58.  
  59. int ObjID7Obj(struct VAobject VAObject)
  60. {
  61.   return(1L);
  62. }
  63. /*    Button  Button         */ 
  64.  
  65. int ObjID8Obj(struct VAobject VAObject)
  66. {
  67.   return(1L);
  68. }
  69. /*    Check Box  Cool!         */ 
  70.  
  71.