Răsfoiți Sursa

* another patch to PolyFill by borsa77
* some indention and newline mistakes fixed

git-svn-id: trunk@13281 -

florian 16 ani în urmă
părinte
comite
a444d4e786
1 a modificat fișierele cu 18 adăugiri și 15 ștergeri
  1. 18 15
      packages/graph/src/inc/graph.inc

+ 18 - 15
packages/graph/src/inc/graph.inc

@@ -466,7 +466,7 @@ var
                     { with predefined line patterns...                 }
                     { with predefined line patterns...                 }
                     if LinePatterns[PixelCount and 15] = TRUE then
                     if LinePatterns[PixelCount and 15] = TRUE then
                       begin
                       begin
-                    DirectPutPixel(x1,PixelCount);
+                        DirectPutPixel(x1,PixelCount);
                       end;
                       end;
               end
               end
             else
             else
@@ -590,7 +590,7 @@ var
              begin
              begin
                   if LinePatterns[i and 15] = TRUE then
                   if LinePatterns[i and 15] = TRUE then
                     begin
                     begin
-                          DirectPutPixel(x,y);
+                      DirectPutPixel(x,y);
                     end;
                     end;
              if d < 0 then
              if d < 0 then
                  begin
                  begin
@@ -843,24 +843,29 @@ var
              Begin
              Begin
                for j:=0 to 7 do
                for j:=0 to 7 do
                     Begin
                     Begin
-                            { x1 mod 8 }
+                    { x1 mod 8 }
                     if RevBitArray[x1 and 7] and TmpFillPattern <> 0 then
                     if RevBitArray[x1 and 7] and TmpFillPattern <> 0 then
-                       DirectPutpixel(x1,y)
+                      begin
+                        OldCurrentColor := CurrentColor;
+                        CurrentColor := FillSettings.Color;
+                        DirectPutpixel(x1,y);
+                        CurrentColor := OldCurrentColor;
+                      end
                     else
                     else
                       begin
                       begin
-                            { According to the TP graph manual, we overwrite everything }
-                            { which is filled up - checked against VGA and CGA drivers  }
-                            { of TP.                                                    }
-                            OldCurrentColor := CurrentColor;
-                            CurrentColor := CurrentBkColor;
-                            DirectPutPixel(x1,y);
-                            CurrentColor := OldCurrentColor;
+                        { According to the TP graph manual, we overwrite everything }
+                        { which is filled up - checked against VGA and CGA drivers  }
+                        { of TP.                                                    }
+                        OldCurrentColor := CurrentColor;
+                        CurrentColor := CurrentBkColor;
+                        DirectPutPixel(x1,y);
+                        CurrentColor := OldCurrentColor;
                       end;
                       end;
                     Inc(x1);
                     Inc(x1);
                     if x1 > x2 then
                     if x1 > x2 then
                      begin
                      begin
-                           CurrentWriteMode := OldWriteMode;
-                           exit;
+                       CurrentWriteMode := OldWriteMode;
+                       exit;
                      end;
                      end;
                    end;
                    end;
              end;
              end;
@@ -870,8 +875,6 @@ var
    end;
    end;
 
 
 
 
-
-
   procedure LineRel(Dx, Dy: smallint);
   procedure LineRel(Dx, Dy: smallint);
 
 
    Begin
    Begin