Compensate for bugfix in NSAffineTransform ... not sure this is correct.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24988 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2007-04-11 17:46:12 +00:00
parent c423ef6b51
commit f7850daa26
2 changed files with 31 additions and 1 deletions

View file

@ -1,3 +1,10 @@
2007-04-11 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSView.m: When transforming a size ensure that the
resulting height is positive. Is this correct behavior?
It should reproduce the old (incorrect ... ie differing from MacOS-X)
behavior of NSAffineTransform.
2007-04-09 21:20-EDT Gregory John Casamento <greg_casamento@yahoo.com>
* Source/NSAnimation.m: Removed static INLINE declaration from

View file

@ -1315,6 +1315,10 @@ GSSetDragTypes(NSView* obj, NSArray *types)
matrix = [self _matrixToWindow];
aRect.origin = [matrix transformPoint: aRect.origin];
aRect.size = [matrix transformSize: aRect.size];
if (aRect.size.height < 0.0)
{
aRect.size.height = -aRect.size.height;
}
aRect.origin.x = floor(aRect.origin.x);
aRect.origin.y = floor(aRect.origin.y);
@ -1324,6 +1328,10 @@ GSSetDragTypes(NSView* obj, NSArray *types)
matrix = [self _matrixFromWindow];
aRect.origin = [matrix transformPoint: aRect.origin];
aRect.size = [matrix transformSize: aRect.size];
if (aRect.size.height < 0.0)
{
aRect.size.height = -aRect.size.height;
}
return aRect;
}
@ -1509,6 +1517,10 @@ static NSRect convert_rect_using_matrices(NSRect aRect, NSAffineTransform *matri
NSAssert(_window == [aView window], NSInvalidArgumentException);
matrix = [aView _matrixToWindow];
new = [matrix transformSize: aSize];
if (new.height < 0.0)
{
new.height = -new.height;
}
if (_coordinates_valid)
{
@ -1519,7 +1531,10 @@ static NSRect convert_rect_using_matrices(NSRect aRect, NSAffineTransform *matri
matrix = [self _matrixFromWindow];
}
new = [matrix transformSize: new];
if (new.height < 0.0)
{
new.height = -new.height;
}
return new;
}
@ -1546,9 +1561,17 @@ static NSRect convert_rect_using_matrices(NSRect aRect, NSAffineTransform *matri
matrix = [self _matrixToWindow];
}
new = [matrix transformSize: aSize];
if (new.height < 0.0)
{
new.height = -new.height;
}
matrix = [aView _matrixFromWindow];
new = [matrix transformSize: new];
if (new.height < 0.0)
{
new.height = -new.height;
}
return new;
}