Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Odd redraw issue



Hi, I have a problem in that drawing a pattern image in a view which is in a scroll view makes a mess when the view is scrolled. I created a test project and made a custom view, made it a subview of a scrollview, and put an image in my project and the only code I had in the custom view was the following:

- (void)drawRect:(NSRect)rect {
[[NSColor whiteColor] set];
NSRectFill(rect);
NSColor *tempColor = [NSColor colorWithPatternImage:[NSImage imageNamed:@"myImage"]];
[tempColor set];
[NSBezierPath fillRect:rect];
}


And the view is still messed up when I scroll with bits of the image being drawn over one another. I tried changing the references to "rect" to [self bounds] but it made no difference.

Any ideas?

Thanks

Gideon King
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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.