Mercurial > sdl-ios-xcode
comparison 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 |
comparison
equal
deleted
inserted
replaced
2908:aa6ba38c1714 | 2909:3da0bb421d83 |
---|---|
202 SDL_SetError("SDL_BlendLine(): Unsupported surface format"); | 202 SDL_SetError("SDL_BlendLine(): Unsupported surface format"); |
203 return (-1); | 203 return (-1); |
204 } | 204 } |
205 | 205 |
206 /* Perform clipping */ | 206 /* Perform clipping */ |
207 /* FIXME | 207 if (!SDL_IntersectRectAndLine(&dst->clip_rect, &x1, &x2, &y1, &y2)) { |
208 if (!SDL_IntersectRect(dstrect, &dst->clip_rect, dstrect)) { | 208 return (0); |
209 return (0); | 209 } |
210 } | 210 |
211 */ | |
212 | 211 |
213 if ((blendMode == SDL_BLENDMODE_BLEND) | 212 if ((blendMode == SDL_BLENDMODE_BLEND) |
214 || (blendMode == SDL_BLENDMODE_ADD)) { | 213 || (blendMode == SDL_BLENDMODE_ADD)) { |
215 r = DRAW_MUL(r, a); | 214 r = DRAW_MUL(r, a); |
216 g = DRAW_MUL(g, a); | 215 g = DRAW_MUL(g, a); |