Re: scrolling an NSImageView leaves tracks
Re: scrolling an NSImageView leaves tracks
- Subject: Re: scrolling an NSImageView leaves tracks
- From: Vince DeMarco <email@hidden>
- Date: Mon, 11 Apr 2005 07:00:16 -0700
On Apr 9, 2005, at 12:53 PM, Geoff Levner wrote:
I have an NSImageView in an NSScrollView. I can zoom in and out,
scroll, load new images, and everything is fine.
Except for one thing. Sometimes, when a newly loaded image is
initially framed so that it is clipped by the scroll view,
scrolling leaves tracks (grey vertical or horizontal lines) where
previously clipped portions of the image become visible. Zooming
in or out once makes them go away. Calling the NSClipView's
setCopiesOnScroll method with NO also makes the problem go away,
but then, of course, scrolling is much slower.
Has anybody out there ever encountered this sort of behavior?
This happens when the coordinates of either the scrollview or the
contents of the scroll view are on non integral boundaries.
Get the frame of the views, and print then out to check this.
The fix is to use NSIntegralRect() on the frame before setting it.
vince
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden