* Source/NSView.m: centerScanRect patch from Sebastian Reitenbach.

Note that this makes the NSView autoresizing and rounding test pass,
but the new centerScanRect test I just added fail.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34104 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Eric Wasylishen 2011-11-01 17:45:21 +00:00
parent 880978575f
commit e6db640322
2 changed files with 10 additions and 4 deletions

View file

@ -1,3 +1,9 @@
2011-11-01 Eric Wasylishen <ewasylishen@gmail.com>
* Source/NSView.m: centerScanRect patch from Sebastian Reitenbach.
Note that this makes the NSView autoresizing and rounding test pass,
but the new centerScanRect test I just added fail.
2011-11-01 Eric Wasylishen <ewasylishen@gmail.com>
* Tests/gui/NSView/NSView_autoresize_and_rounding.m: Add

View file

@ -1667,10 +1667,10 @@ static NSSize _computeScale(NSSize fs, NSSize bs)
aRect.size.height = -aRect.size.height;
}
aRect.origin.x = floor(aRect.origin.x);
aRect.origin.y = floor(aRect.origin.y);
aRect.size.width = floor(aRect.size.width);
aRect.size.height = floor(aRect.size.height);
aRect.origin.x = GSRoundTowardsInfinity(aRect.origin.x);
aRect.origin.y = GSRoundTowardsInfinity(aRect.origin.y);
aRect.size.width = GSRoundTowardsInfinity(aRect.size.width);
aRect.size.height = GSRoundTowardsInfinity(aRect.size.height);
matrix = [self _matrixFromWindow];
aRect.origin = [matrix transformPoint: aRect.origin];