Re: NSScrollView drawing errors (Cocoa Bug?)
Re: NSScrollView drawing errors (Cocoa Bug?)
- Subject: Re: NSScrollView drawing errors (Cocoa Bug?)
- From: Jonathon Mah <email@hidden>
- Date: Fri, 14 Oct 2005 00:21:13 +0930
Michael,
I think I have found the reason for the messed up drawing and I am
pretty sure it's a Cocoa bug. When setting an NSScrollView's frame
to values that contain decimal amounts, like so:
[scrollView setFrame:NSMakeRect(10.5f, 10.6f, 100.2f, 100.8f)];
the scrolling and drawing are completely messed up. If you change
this to the following:
[scrollView setFrame:NSMakeRect(10.0f, 10.0f, 100.0f, 100.0f)];
drawing and scrolling work nicely and without any errors. That is
the scenario at least on my machine. If somebody can confirm this I
will file a bug.
This is well-known behavior of NSScrollView and friends. Filing a bug
would be good, though -- even if the issue isn't fixed, it needs at
least to be clearly documented in the NSScrollView class.
So you need to use integer values with the scrollview. NSIntegralRect
can help out here.
Jonathon Mah
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