Re: Strange NSView redraw problem
Re: Strange NSView redraw problem
- Subject: Re: Strange NSView redraw problem
- From: Ricky Sharp <email@hidden>
- Date: Sat, 30 Sep 2006 09:32:12 -0500
On Sep 30, 2006, at 12:39 AM, John Cassington wrote:
Hello,
I have a nsview class which is used more than once at a time. the view
can be 'selected' in that its background color can change based on a
boolean value.
when i change the 'selection' from view to view, the nsbezierpath used
to draw the curved border around the view does not clear properly.
here are two example images:
before: http://img88.imageshack.us/img88/7259/
beforemultipleredrawsvc7.png
after: http://img136.imageshack.us/img136/3713/
aftermultipleredrawsrz9.png
i think this has something to do with anti-aliasing, but i am not
sure.
i am using the following three lines to try and clear the view
before a redraw:
NSEraseRect([self frame]);
[[NSColor clearColor] set];
NSRectFill([self frame]);
Try removing the above three lines and then make sure if you
implement isOpaque, that you return NO:
- (BOOL)isOpaque
{
return NO;
}
Or, simply leave out isOpaque as by default, NSView returns NO.
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
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