Browse Source

+ VESA Driver name

carl 26 years ago
parent
commit
8e45cea1c3
1 changed files with 13 additions and 8 deletions
  1. 13 8
      rtl/inc/graph/graph.pp

+ 13 - 8
rtl/inc/graph/graph.pp

@@ -305,6 +305,7 @@ Interface
        LowRes        = 1;
        LowRes        = 1;
        HercMono      = 7;
        HercMono      = 7;
        VGA           = 9;
        VGA           = 9;
+       VESA          = 10;
 
 
        { graph modes }
        { graph modes }
        Default = 0;
        Default = 0;
@@ -607,6 +608,10 @@ procedure SetFillPattern(Pattern: FillPatternType; Color: word);
 
 
 Implementation
 Implementation
 
 
+{$IFDEF DPMI}
+uses WinAPI;
+{$ENDIF}
+
 const
 const
    StdBufferSize = 4096;   { Buffer size for FloodFill }
    StdBufferSize = 4096;   { Buffer size for FloodFill }
 
 
@@ -2320,7 +2325,7 @@ end;
 
 
 
 
 	 CurrentColor:=white;
 	 CurrentColor:=white;
-	 SetBkColor(Black);
+	 SetBkColor(Blue);
 
 
 
 
 	 ClipPixels := TRUE;
 	 ClipPixels := TRUE;
@@ -2363,7 +2368,7 @@ end;
   procedure SetWriteMode(WriteMode : integer);
   procedure SetWriteMode(WriteMode : integer);
    begin
    begin
      if (writemode<>xorput) and (writemode<>CopyPut) then
      if (writemode<>xorput) and (writemode<>CopyPut) then
-	exit;
+	    exit;
      CurrentWriteMode := WriteMode;
      CurrentWriteMode := WriteMode;
    end;
    end;
 
 
@@ -2383,16 +2388,16 @@ end;
 
 
 
 
 
 
-    procedure DrawPoly(numpoints : word;var polypoints);
+  procedure DrawPoly(numpoints : word;var polypoints);
 
 
       type
       type
-	 ppointtype = ^pointtype;
-	 pt = array[0..16000] of pointtype;
+	    ppointtype = ^pointtype;
+        pt = array[0..16000] of pointtype;
 
 
       var
       var
-	 i : longint;
+	    i : longint;
 
 
-      begin
+    begin
 	 if numpoints < 2 then
 	 if numpoints < 2 then
 	   begin
 	   begin
 	     _GraphResult := grError;
 	     _GraphResult := grError;
@@ -2403,7 +2408,7 @@ end;
 		pt(polypoints)[i].y,
 		pt(polypoints)[i].y,
 		pt(polypoints)[i+1].x,
 		pt(polypoints)[i+1].x,
 		pt(polypoints)[i+1].y);
 		pt(polypoints)[i+1].y);
-      end;
+    end;
 
 
 
 
   procedure PieSlice(X,Y,stangle,endAngle:integer;Radius: Word);
   procedure PieSlice(X,Y,stangle,endAngle:integer;Radius: Word);