• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Strange NSView redraw problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Strange NSView redraw problem (From: "John Cassington" <email@hidden>)

  • Prev by Date: CoreDate: Inverse relationship returns NSCFNumber instead of entity
  • Next by Date: Re: Help Book not working
  • Previous by thread: Strange NSView redraw problem
  • Next by thread: RE: Strange NSView redraw problem
  • Index(es):
    • Date
    • Thread