diff src/video/SDL_blendfillrect.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 b931bcfd94a0
children f7b03b6838cb
line wrap: on
line diff
--- a/src/video/SDL_blendfillrect.c	Fri Dec 18 07:03:09 2009 +0000
+++ b/src/video/SDL_blendfillrect.c	Fri Dec 18 07:41:59 2009 +0000
@@ -203,11 +203,6 @@
         return -1;
     }
 
-    if (blendMode < SDL_BLENDMODE_BLEND) {
-        Uint32 color = SDL_MapRGBA(dst->format, r, g, b, a);
-        return SDL_FillRect(dst, rect, color);
-    }
-
     /* This function doesn't work on surfaces < 8 bpp */
     if (dst->format->BitsPerPixel < 8) {
         SDL_SetError("SDL_BlendFillRect(): Unsupported surface format");
@@ -281,11 +276,6 @@
         return -1;
     }
 
-    if (blendMode < SDL_BLENDMODE_BLEND) {
-        Uint32 color = SDL_MapRGBA(dst->format, r, g, b, a);
-        return SDL_FillRects(dst, rects, color);
-    }
-
     /* This function doesn't work on surfaces < 8 bpp */
     if (dst->format->BitsPerPixel < 8) {
         SDL_SetError("SDL_BlendFillRects(): Unsupported surface format");