Browse Source

* small change to internalellipsedef to be TP compatible
* fixed directputpixel for vga 320*200*256

Jonas Maebe 26 years ago
parent
commit
6ea818a303
2 changed files with 18 additions and 21 deletions
  1. 11 3
      rtl/inc/graph/graph.inc
  2. 7 18
      rtl/inc/graph/graph.pp

+ 11 - 3
rtl/inc/graph/graph.inc

@@ -983,8 +983,12 @@ CONST
  begin
  begin
    dummy := CurrentColor;
    dummy := CurrentColor;
    offset := y * 320 + x + VideoOfs;
    offset := y * 320 + x + VideoOfs;
-   If CurrentWriteMode = XorPut Then
-     dummy := dummy xor Mem[$a000:offset];
+   case CurrentWriteMode of
+     XorPut: dummy := dummy xor Mem[$a000:offset];
+     OrPut: dummy := dummy or Mem[$a000:offset];
+     AndPut: dummy := dummy and Mem[$a000:offset];
+     NotPut: dummy := Not dummy;
+   end;
    Mem[$a000:offset] := dummy;
    Mem[$a000:offset] := dummy;
  end;
  end;
 {$else asmgraph}
 {$else asmgraph}
@@ -2579,7 +2583,11 @@ const CrtAddress: word = 0;
 
 
 {
 {
 $Log$
 $Log$
-Revision 1.11  1999-09-12 17:28:59  jonas
+Revision 1.12  1999-09-15 13:37:50  jonas
+  * small change to internalellipsedef to be TP compatible
+  * fixed directputpixel for vga 320*200*256
+
+Revision 1.11  1999/09/12 17:28:59  jonas
   * several changes to internalellipse to make it faster
   * several changes to internalellipse to make it faster
     and to make sure it updates the ArcCall correctly
     and to make sure it updates the ArcCall correctly
     (not yet done for width = 3)
     (not yet done for width = 3)

+ 7 - 18
rtl/inc/graph/graph.pp

@@ -1358,8 +1358,6 @@ var
      End;
      End;
    If xradius = 0 then inc(x);
    If xradius = 0 then inc(x);
    if yradius = 0 then inc(y);
    if yradius = 0 then inc(y);
-   inc(xradius);
-   inc(yradius);
    { check if valid angles }
    { check if valid angles }
    stangle := stAngle mod 361;
    stangle := stAngle mod 361;
    EndAngle := EndAngle mod 361;
    EndAngle := EndAngle mod 361;
@@ -2151,23 +2149,10 @@ end;
   {    supports XORPut but the FloodFill() is still bounded}
   {    supports XORPut but the FloodFill() is still bounded}
   {    by the ellipse. In OUR case, XOR Mode is simply     }
   {    by the ellipse. In OUR case, XOR Mode is simply     }
   {    not supported.                                      }
   {    not supported.                                      }
+  {  - update: other write modes are now supported (JM     }
   {********************************************************}
   {********************************************************}
-  var
-   OldWriteMode: Word;
   begin
   begin
-    { only normal put supported }
-    OldWriteMode := CurrentWriteMode;
-    CurrentWriteMode := NormalPut;
-    if (XRadius > 0) and (YRadius > 0) then
-      InternalEllipse(X,Y,XRadius,YRadius,0,360,PatternLine)
-    Else
-{$ifdef fpc}
-      InternalEllipse(X,Y,XRadius+1,YRadius+1,0,60,@DummyPatternLine);
-{$else fpc}
-      InternalEllipse(X,Y,XRadius+1,YRadius+1,0,60,DummyPatternLine);
-{$endif fpc}
-    { restore old write mode }
-    CurrentWriteMode := OldWriteMode;
+    InternalEllipse(X,Y,XRadius,YRadius,0,360,PatternLine)
   end;
   end;
 
 
 
 
@@ -2788,7 +2773,11 @@ DetectGraph
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.21  1999-09-13 12:49:08  jonas
+  Revision 1.22  1999-09-15 13:37:50  jonas
+    * small change to internalellipsedef to be TP compatible
+    * fixed directputpixel for vga 320*200*256
+
+  Revision 1.21  1999/09/13 12:49:08  jonas
     * fixed Arc: internallellipse went into an endless loop if StAngle =
     * fixed Arc: internallellipse went into an endless loop if StAngle =
       EndAngle
       EndAngle
     * FillEllipse is now much faster: no more floodfill,
     * FillEllipse is now much faster: no more floodfill,