home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_progs / libs / plotlib.lha / Plot_1.lzh / Demo / graphik.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-02-04  |  2.7 KB  |  96 lines

  1. /****************************************************************
  2.  *                                                                                                                            *
  3.  * Filename : Graphik.c                                                                                    *
  4.  *                                                                                                                            *
  5.  ****************************************************************
  6.  *                                                                                                                            *
  7.  *    Comment : Alle Graphikbefehle                                                                *
  8.  *                                                                                                                            *
  9.  *                                                                                                                            *
  10.  *                                                                                                                            *
  11.  *            Rev : V1.0                                                                                            *
  12.  *                                                                                                                            *
  13.  *    History : V1.0 erstellen dieses Files                            17.09.89    *
  14.  *                                                                                                                            *
  15.  *            Doc :                                                                                                        *
  16.  *                                                                                                                            *
  17.  *         Bugs : keine bekannten                                                                        *
  18.  *                                                                                                                            *
  19.  *        Autor : Oesch Silvano                                                                            *
  20.  *                                                                                                                            *
  21.  *        Datum : 17.09.89                                                                                    *
  22.  *                                                                                                                            *
  23.  ****************************************************************/
  24.  
  25.  
  26.  
  27. /****************************************************************
  28.  *                                                                                                                            *
  29.  * allgemeine Includedateien                                                                        *
  30.  *                                                                                                                            *
  31.  ****************************************************************/
  32.  
  33. #include <ctype.h>
  34. #include <exec/types.h>
  35. #include <intuition/intuition.h>
  36. #include <intuition/intuitionbase.h>
  37. #include <stdlib.h>
  38. #include <stdio.h>
  39. #include <string.h>
  40. #include <dos.h>
  41. #include <graphics/gfxbase.h>
  42. #include <graphics/gfxmacros.h>
  43.  
  44. /****************************************************************
  45.  *                                                                                                                            *
  46.  * programmspezifische Includedateien                                                        *
  47.  *                                                                                                                            *
  48.  ****************************************************************/
  49.  
  50. #include "function.h"
  51.  
  52. /****************************************************************
  53.  *                                                                                                                            *
  54.  * globale Definitionen                                                                                    *
  55.  *                                                                                                                            *
  56.  ****************************************************************/
  57.  
  58. void Rechteck(Rp, colour, x1, y1, x2, y2)
  59. struct RastPort *Rp;
  60. int colour, x1, y1, x2, y2;
  61.     {
  62.         BYTE apen,
  63.                  open,
  64.                  drmd;
  65.  
  66.         apen = Rp->FgPen;                                /* speichern der akt. Farbe    */
  67.         open = Rp->AOlPen;                            /* speichern Rahmenfarbe        */
  68.         drmd = Rp->DrawMode;                        /* speichern Drawmode                */
  69.         SetAPen(Rp,0l);
  70.         SetOPen(Rp,colour);
  71.         SetDrMd(Rp,JAM2);
  72.         RectFill(Rp, x1, y1, x2, y2);
  73.         SetAPen(Rp,(long)apen);
  74.         SetOPen(Rp,(long)open);
  75.         SetDrMd(Rp,(long)drmd);
  76.     }
  77.  
  78. void line (Rp,colour,x1,y1,x2,y2)
  79. struct RastPort *Rp;
  80. int colour, x1, y1, x2, y2;
  81.     {
  82.         BYTE apen;
  83.  
  84.         apen = Rp->FgPen;                                /* speichern der akt. Farbe    */
  85.         SetAPen(Rp,colour);
  86.         Move (Rp,x1,y1);
  87.         Draw(Rp,x2,y2);
  88.         SetAPen(Rp,(long)apen);
  89.     }
  90.  
  91. void clscr(Rp)
  92. struct RastPort *Rp;
  93.     {
  94.         SetRast(Rp,0L);
  95.     }
  96.