diff src/video/SDL_drawline.c @ 3594:c8bed77b0386

Added SDL_DrawRect(), SDL_DrawRects(), SDL_BlendRect() and SDL_BlendRects() Fixed line drawing so when blending a sequence of lines there are no overlapping pixels drawn.
author Sam Lantinga <slouken@libsdl.org>
date Fri, 18 Dec 2009 07:41:59 +0000
parents 0267b8b1595c
children f638ded38b8a
line wrap: on
line diff
--- a/src/video/SDL_drawline.c	Fri Dec 18 07:03:09 2009 +0000
+++ b/src/video/SDL_drawline.c	Fri Dec 18 07:41:59 2009 +0000
@@ -46,16 +46,16 @@
 
     switch (dst->format->BytesPerPixel) {
     case 1:
-        DRAWLINE(x1, y1, x2, y2, DRAW_FASTSETPIXEL1);
+        DRAWLINE(x1, y1, x2, y2, DRAW_FASTSETPIXEL1, SDL_TRUE);
         break;
     case 2:
-        DRAWLINE(x1, y1, x2, y2, DRAW_FASTSETPIXEL2);
+        DRAWLINE(x1, y1, x2, y2, DRAW_FASTSETPIXEL2, SDL_TRUE);
         break;
     case 3:
         SDL_Unsupported();
         return -1;
     case 4:
-        DRAWLINE(x1, y1, x2, y2, DRAW_FASTSETPIXEL4);
+        DRAWLINE(x1, y1, x2, y2, DRAW_FASTSETPIXEL4, SDL_TRUE);
         break;
     }
     return 0;
@@ -96,16 +96,16 @@
 
         switch (dst->format->BytesPerPixel) {
         case 1:
-            DRAWLINE(x1, y1, x2, y2, DRAW_FASTSETPIXEL1);
+            DRAWLINE(x1, y1, x2, y2, DRAW_FASTSETPIXEL1, SDL_TRUE);
             break;
         case 2:
-            DRAWLINE(x1, y1, x2, y2, DRAW_FASTSETPIXEL2);
+            DRAWLINE(x1, y1, x2, y2, DRAW_FASTSETPIXEL2, SDL_TRUE);
             break;
         case 3:
             SDL_Unsupported();
             return -1;
         case 4:
-            DRAWLINE(x1, y1, x2, y2, DRAW_FASTSETPIXEL4);
+            DRAWLINE(x1, y1, x2, y2, DRAW_FASTSETPIXEL4, SDL_TRUE);
             break;
         }
     }