home *** CD-ROM | disk | FTP | other *** search
- (**************************************************************)
- (* GRAFCONS.PAS muss um folgende zwei Konstanten erweitert *)
- (* werden:
-
- (*----------------- Polygon-Konstante: -----------------------*)
-
- PolyMax = 100; (* max. Anzahl von Eckkoordinaten *)
-
- (*----------------- Pattern-Konstante: -----------------------*)
- (* Hier fuer ein Muster von 16 x 16 Pixeln. *)
-
- PatternSize = 15;
-
- (**************************************************************)
- (* GRAFTYPE.PAS muss um folgende Typen erweitert werden: *)
-
- (*---------------------- Polygon-Typ: ------------------------*)
-
- PolyPunkt = RECORD (* Punkt-Koordinaten eines Punktes *)
- x, y: INTEGER;
- END;
- PolyIndex = 1..PolyMax; (* Indextyp fuer 'Range-Check' *)
- Polygon = ARRAY [PolyIndex] OF PolyPunkt;
-
- (*---------------------- Pattern-Typ: ------------------------*)
-
- PatternIndex = 0..PatternSize;
- Pattern_ = ARRAY [PatternIndex, PatternIndex] OF BOOLEAN;
- (* der Unterstrich hinter Pattern ist bei Turbo wg. einer
- Prozedur gleichen Namens notwendig! *)
-
- (***************************************************************************)
- (* GRAFSYS.PAS muss um folgende zwei Funktionen erweitert werden: *)
-
- (*-------------------------------------------------------------------------*)
- (* Punkt auf den vom System vorgegebenen Bildschirm-Koordinaten testen: *)
- (* TRUE, wenn Punkt die akt. Farbe von Pen_Color hat, sonst FALSE! *)
- (* Hier mua die entsprechende Funktion der verw. Implementation entspr. *)
- (* gegen die Turbo Pascal-Funktion ausgetauscht werden! Eventuell ist *)
- (* dabei der Krampf mit 'Pen_Color' und 0 und 1 nicht notwendig... *)
-
- FUNCTION GetPixel_System (x: x_Koord_Sys;
- y: y_Koord_Sys;
- Color: Sys_Colors): BOOLEAN;
-
- BEGIN
- GetPixel_System := (GetDotColor(x,y) > 0) AND (Color = Pen_Color)
- END;
-
- (*-------------------------------------------------------------------------*)
- (* Punkt unseres Koordinaten-Systems testen: *)
-
- FUNCTION GetPixel (x: x_Koord; y: y_Koord; Color: Sys_Colors): BOOLEAN;
-
- BEGIN
- IF Origin_is_Top THEN
- GetPixel := GetPixel_System(x + ScreenXmin_Sys,
- ScreenYmax - y + ScreenYmin_Sys,
- Color)
- ELSE
- GetPixel := GetPixel_System(x + ScreenXmin_Sys,
- y + ScreenYmin_Sys,
- Color)
- END;
-
- (*-------------------------------------------------------------------------*)