Re: NSImage gets distorted when scrolled
Re: NSImage gets distorted when scrolled
- Subject: Re: NSImage gets distorted when scrolled
- From: Ron Ballesteros <email@hidden>
- Date: Sun, 3 Oct 2004 17:32:44 -0700
Do you clear the background in drawRect:?
No unless I am missing something. I do have (code below) in my drawRect: of my custom view.
[[NSColor clearColor] set];
NSRectFill(bounds);
It might be helpful if you put online an image of the result you see.
Below is an image of what occurs when I scroll down. The image that I have loaded is actually a map of california.
http://homepage.mac.com/ronmb/customview.tiff
I did notice that when I don't set the frame size of my custom view to the size of my image in the
initWithFrame: I don't get the
problem of the scrolling as shown on the link above. Is it right to set the frame size of my custom view to the size of the image in the initWithFrame: ?
I'm currently re-reading the documentation and nothing seems to jump out at me. So I'm still trying to figure out what might be the problem and hopefully
someone can point out what I'm missing.
Thanks.
ron
On Oct 3, 2004, at 1:51 AM, Allan Odgaard wrote:
On 3. Oct 2004, at 5:40, Ron Ballesteros wrote:
I'm working on a small app that has a custom view and I'm currently running into a problem with my NSImage that I draw in the custom view.
The problem that I am having is that when I resize the window and scroll the image that is drawn which is a jpg file, the image gets stretch or smeared (not quite sure of the best way to describe it) in the direction that I scroll.
Do you clear the background in drawRect:?
It might be helpful if you put online an image of the result you see.
--
http://macromates.com/ ::: TextMate, OS X text editor
http://macromates.com/sigpipe/ ::: Personal weblog about programming
_______________________________________________
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