Make sure we fully clip the first point before starting to adjust the second point.
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404286
This commit is contained in:
parent
1ba0c1618e
commit
60b65d182a
1 changed files with 1 additions and 3 deletions
|
@ -311,9 +311,7 @@ SDL_IntersectRectAndLine(const SDL_Rect * rect, int *X1, int *Y1, int *X2,
|
|||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue