Mercurial > sdl-ios-xcode
changeset 3542:97eae5a705f9
Make sure we fully clip the first point before starting to adjust the second point.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 11 Dec 2009 09:57:54 +0000 |
parents | 0c429a5fda8a |
children | c2154674c0c1 |
files | src/video/SDL_rect.c |
diffstat | 1 files changed, 1 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/video/SDL_rect.c Fri Dec 11 09:22:34 2009 +0000 +++ b/src/video/SDL_rect.c Fri Dec 11 09:57:54 2009 +0000 @@ -311,9 +311,7 @@ x1 = x; y1 = y; outcode1 = ComputeOutCode(rect, x, y); - } - - if (outcode2) { + } else { if (outcode2 & CODE_TOP) { y = recty1; x = x1 + ((x2 - x1) * (y - y1)) / (y2 - y1);