home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Pascal / MAXONPASCAL3.DMS / in.adf / DEMOS-OS1.3 / SysProg / Grafik1.p < prev    next >
Encoding:
Text File  |  1994-07-23  |  1.1 KB  |  46 lines

  1. { MAXONPascal3-Anpassung / Test:  Falk Zühlsdorff (PackMAN) 1994 }
  2.  
  3. PROGRAM Grafik1;
  4. USES GRAPHICS,INTUITION;
  5.  
  6. VAR
  7.   Win: ^Window;
  8.   Rp: ^RastPort; { dieser Typ wird in "graphics/rastport.h" definiert }
  9.   err: long;
  10.   Msg: Ptr;
  11.   i: integer;
  12.  
  13. BEGIN
  14.   Win:= Open_Window(0, 0, 640, 200, 1, _CLOSEWINDOW,
  15.         GIMMEZEROZERO+ACTIVATE+WINDOWCLOSE+WINDOWDRAG+WINDOWDEPTH,
  16.         'Grafikdemo', Nil, 640, 200, 640, 200);
  17.   Rp:= Win^.RPort;
  18.  
  19.   Move(Rp, 5, 40);
  20.   SetAPen(Rp, 1);    { Ausgabe: weiß ... }
  21.   SetBPen(Rp, 3);    { ...auf rot }
  22.   SetDrMd(Rp, 1);    { damit Hintergrundfarbe auch ausgegeben wird }
  23.   err:=_Text(Rp, ' Dies ist eine Grafik-Demo. ######', 28);
  24.  
  25.   SetAPen(Rp, 3);    { rote Linien }
  26.   For i:=0 to 20 Do
  27.     BEGIN
  28.       Move(Rp, 220+20*i, 5);
  29.       Draw(Rp, 620, 5+9*i)
  30.     END;
  31.  
  32.   For i:=1 to 10 do
  33.     BEGIN
  34.       SetAPen(Rp, 1 + i mod 3);    { wechselnde Farben }
  35.       RectFill(Rp, 5*i, 75+2*i, 320-25*i, 180-8*i)
  36.     END;
  37.  
  38.   Msg:= Wait_Port(Win^.UserPort);  { aufs Schließen warten }
  39.   Msg:= Get_Msg(Win^.Userport);
  40.   Reply_Msg(Msg);
  41.  
  42.   Close_Window(Win);
  43.   CloseLib(Intuitionbase);
  44.   CloseLib(GfxBase);
  45. END.
  46.