mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 15:11:37 +00:00
* Source/NSClipView.m: Re-enable copy-on-scroll
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34918 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
88fdeb6886
commit
325a56881f
1 changed files with 4 additions and 22 deletions
|
@ -255,8 +255,7 @@ static inline NSRect integralRect (NSRect rect, NSView *view)
|
|||
return;
|
||||
}
|
||||
|
||||
// FIXME: Re-enable after release
|
||||
if (NO) //_copiesOnScroll && _window && [_window gState])
|
||||
if (_copiesOnScroll && _window && [_window gState])
|
||||
{
|
||||
/* Copy the portion of the view that is common before and after
|
||||
scrolling. Then, document view needs to redraw the remaining
|
||||
|
@ -425,28 +424,11 @@ static inline NSRect integralRect (NSRect rect, NSView *view)
|
|||
do the scrolling, the difference is an integer and so we can copy
|
||||
the image translating it by an integer in device space - and not
|
||||
by a float. */
|
||||
/*
|
||||
|
||||
new = [self convertPoint: new toView: nil];
|
||||
new.x = (int)new.x;
|
||||
new.y = (int)new.y;
|
||||
new.x = GSRoundTowardsInfinity(new.x);
|
||||
new.y = GSRoundTowardsInfinity(new.y);
|
||||
new = [self convertPoint: new fromView: nil];
|
||||
*/
|
||||
|
||||
/*
|
||||
We don't make it an integer this way anymore.
|
||||
This is not needed when _copiesOnScroll is not set.
|
||||
If _copiesOnScroll is set, we make sure the difference between old
|
||||
position and new position is an integer so we can copy the image
|
||||
easily.
|
||||
FIXME: Why should this help? If the value is integral in user space this does
|
||||
not mean anything in device space.
|
||||
*/
|
||||
if (_copiesOnScroll)
|
||||
{
|
||||
new.x = _bounds.origin.x + (GSRoundTowardsInfinity(new.x - _bounds.origin.x));
|
||||
new.y = _bounds.origin.y + (GSRoundTowardsInfinity(new.y - _bounds.origin.y));
|
||||
}
|
||||
|
||||
return new;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue