diff src/video/SDL_blendline.c @ 2909:3da0bb421d83

Added line clipping
author Sam Lantinga <slouken@libsdl.org>
date Tue, 23 Dec 2008 02:23:18 +0000
parents 3a9636c83849
children 27d8b12e0e8e
line wrap: on
line diff
--- a/src/video/SDL_blendline.c	Tue Dec 23 01:28:06 2008 +0000
+++ b/src/video/SDL_blendline.c	Tue Dec 23 02:23:18 2008 +0000
@@ -204,11 +204,10 @@
     }
 
     /* Perform clipping */
-    /* FIXME
-       if (!SDL_IntersectRect(dstrect, &dst->clip_rect, dstrect)) {
-       return (0);
-       }
-     */
+    if (!SDL_IntersectRectAndLine(&dst->clip_rect, &x1, &x2, &y1, &y2)) {
+        return (0);
+    }
+
 
     if ((blendMode == SDL_BLENDMODE_BLEND)
         || (blendMode == SDL_BLENDMODE_ADD)) {