Skip navigation.
 
mlRe: scrolling an NSImageView leaves tracks
FROM : Geoff Levner
DATE : Mon Apr 11 17:16:23 2005

Great googly woogly!  I would never have figured that out on my own. 
Thank you.

Geoff

On 11 Apr 2005, at 16:00, Vince DeMarco wrote:

>
> 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_removed>)
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>>
>> This email sent to <email_removed>
>>

>
>

Related mailsAuthorDate
mlscrolling an NSImageView leaves tracks Geoff Levner Apr 9, 21:53
mlRe: scrolling an NSImageView leaves tracks John Pannell Apr 9, 23:50
mlRe: scrolling an NSImageView leaves tracks Geoff Levner Apr 10, 01:31
mlRe: scrolling an NSImageView leaves tracks John Pannell Apr 10, 04:02
mlRe: scrolling an NSImageView leaves tracks Hamish Allan Apr 10, 04:25
mlRe: scrolling an NSImageView leaves tracks Geoff Levner Apr 10, 11:36
mlRe: scrolling an NSImageView leaves tracks Vince DeMarco Apr 11, 16:00
mlRe: scrolling an NSImageView leaves tracks Geoff Levner Apr 11, 17:16