Commits

pygame  committed 3745ecb

single pixel line draw fix

  • Participants
  • Parent commits 6e27a08

Comments (0)

Files changed (2)

 
 September 29, 2003
     Replaced Objective C with PyObjC code for MacOS X
+    Fixed 1 pixel horizontal/vertical line draw
 
 September 27, 2003
 	Fix reading from file file-like objects (thx Timothy Stranex)
 	Uint8 *pixel, *end;
 	Uint8 *colorptr;
 
-	if(x1 == x2) return;
+	if(x1 == x2)
+        {
+            set_at(surf, x1, y1, color);
+            return;
+        }
 
 	pixel = ((Uint8*)surf->pixels) + surf->pitch * y1;
 	if(x1 < x2)
        Uint8   *colorptr;
        Uint32  pitch = surf->pitch;
 
-       if(y1 == y2) return;
+       if(y1 == y2)
+       {
+           set_at(surf, x1, y1, color);
+           return;
+       }
 
        pixel = ((Uint8*)surf->pixels) + x1 * surf->format->BytesPerPixel;
        if(y1 < y2)