• 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: Rounded rect overlap in collection view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rounded rect overlap in collection view


  • Subject: Re: Rounded rect overlap in collection view
  • From: PCWiz <email@hidden>
  • Date: Sat, 31 Oct 2009 15:17:52 -0600

I tried drawing a rect around the whole frame like so:

- (void)drawRect:(NSRect)dirtyRect
{
NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:[self frame] xRadius:6.0 yRadius:6.0];
[[NSColor whiteColor] set];
[path stroke];
[super drawRect:dirtyRect];
}


..and I get the same result

On 2009-10-31, at 2:54 PM, Kyle Sluder wrote:

On Oct 31, 2009, at 1:10 PM, PCWiz <email@hidden> wrote:

- (void)drawRect:(NSRect)dirtyRect
{
[[NSColor whiteColor] set];
NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:dirtyRect xRadius:6.0 yRadius:6.0];

You're rounding the wrong rect here. You want the whole view frame, not the dirty rect (whatever the drawing machinery has decided is the smallest rect you need to draw).


--Kyle Sluder

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Rounded rect overlap in collection view
      • From: Graham Cox <email@hidden>
References: 
 >Rounded rect overlap in collection view (From: PCWiz <email@hidden>)
 >Re: Rounded rect overlap in collection view (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Rounded rect overlap in collection view
  • Next by Date: Re: 64 bit cocoa version of HIViewFlashDirtyArea() ?
  • Previous by thread: Re: Rounded rect overlap in collection view
  • Next by thread: Re: Rounded rect overlap in collection view
  • Index(es):
    • Date
    • Thread