home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / 1987 / 07 / grafik / graftype.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1987-05-04  |  3.3 KB  |  79 lines

  1. (*------------------------------------------------------------*)
  2. (*                      GRAFTYPE.PAS                          *)
  3. (*       Globale Typendefinition fuer die Grafikserie         *)
  4. (*------------------------------------------------------------*)
  5.  
  6.   x_Koord_Sys = ScreenXmin_Sys..ScreenXmax_Sys;
  7.   y_Koord_Sys = ScreenYmin_Sys..ScreenYmax_Sys;
  8.  
  9.   x_Koord = 0..ScreenXmax;
  10.   y_Koord = 0..ScreenYmax;
  11.  
  12.   Sys_Colors = First_Color_Value..Last_Color_Value;
  13.  
  14. (*---------------------- Polygon-Typ: ------------------------*)
  15.  
  16.   PolyPunkt = RECORD       (* Punkt-Koordinaten eines Punktes *)
  17.                 x, y: INTEGER;
  18.               END;
  19.   PolyIndex = 1..PolyMax;      (* Indextyp fuer 'Range-Check' *)
  20.   Polygon   = ARRAY [PolyIndex] OF PolyPunkt;
  21.  
  22. (*---------------------- Pattern-Typ: ------------------------*)
  23.  
  24.   PatternIndex = 0..PatternSize;
  25.   Pattern_     = ARRAY [PatternIndex, PatternIndex] OF BOOLEAN;
  26.   (* der Unterstrich hinter Pattern ist bei Turbo wg. einer
  27.      Prozedur gleichen Namens notwendig!                      *)
  28.  
  29. (*--------------------------------------------------------------------------*)
  30. (*                             GRAFTYPE.ERW                                 *)
  31. (*  Erweiterung der Typendeklarationen der Graphikserie fuer Windowhandling *)
  32.  
  33.   (*-------------------------------------------------------------------*)
  34.   (* Der folgende Typ WinBackground muss so vereinbart werden, dass er *)
  35.   (* ggf. dazu geeignet ist, den Hintergrund, der beim oeffnen des     *)
  36.   (* Fensters abgespeichert wird, aufzunehmen.                         *)
  37.   (* SYSTEMABHAENGIG (wenn ueberhaupt moeglich) !                      *)
  38.  
  39.     WinBuffer = array[1..8003] of integer; (* Turbo Pascal auf MS-DOS *)
  40.     WinBackground = ^WinBuffer;            (* mit CGA-Grafikkarte.    *)
  41.  
  42.   (*                                                                   *)
  43.   (*-------------------------------------------------------------------*)
  44.  
  45.   WinNrBereich = NULL..MaxWins;
  46.  
  47.   WinRec = record
  48.              xmin, ymin,
  49.              xmax, ymax : real;            (* Weltkoordinatenausschnitt *)
  50.              Pixel_pro_x,                  (* Window/Viewport- *)
  51.              Pixel_pro_y : real;           (* Proportionen     *)
  52.              Vxmin, Vxmax : x_Koord;       (* Bildschirmausschnitt *)
  53.              Vymin, Vymax : y_Koord;       (* des Viewport         *)
  54.              Background : WinBackground
  55.            end;
  56.  
  57.   WinFeld = array[WinNrBereich] of ^WinRec;
  58.  
  59. (*-------------------------------------------------------------------------*)
  60. (*                          Ende GRAFTYPE.ERW                              *)
  61.  
  62. (*------------------------------------------------------------*)
  63. (*                     GRAFTYPE.ERW                           *)
  64. (* Typendefinition fuer zweidimensionale Transformationen:    *)
  65.  
  66.  tVektor = array[1..xMatDim] of real;
  67.  tMatrix = array[1..yMatDim,1..xMatDim] of real;
  68.  
  69.  ObjektIndex  = 1..MaxLineObj;
  70.  LinienObjekt = array[ObjektIndex] of
  71.                   Record
  72.                     Vektor1, Vektor2: tVektor;
  73.                   end;
  74.  
  75. (*------------------------------------------------------------*)
  76. (*                   Ende GRAFTYPE.ERW                        *)
  77.  
  78. (*------------------------------------------------------------*)
  79. (*                  Ende von GRAFTYPE.PAS                     *)