Re: Draw rounded NSImage

2009-12-07 Thread John Wright
Thanks Gideon, that worked. On Sun, Dec 6, 2009 at 9:03 PM, Gideon King gid...@novamind.com wrote: Your code restores the graphics state, which will remove your rounded rect clipping path, before you draw the image. If you draw the image before restoring the graphics state, you should be

Draw rounded NSImage

2009-12-06 Thread John Wright
I am trying to create a NSImage or NSImageCell with rounded corners inside a NSTableView. I can't get anything to work. Here is the best I have so far inside my custom NSCell: - (void)drawInteriorWithFrame:(NSRect)frame inView:(NSView *)controlView {   if (thumbnailLink) {         NSURL *url =

Re: Draw rounded NSImage

2009-12-06 Thread Gideon King
Your code restores the graphics state, which will remove your rounded rect clipping path, before you draw the image. If you draw the image before restoring the graphics state, you should be OK. Also you should not need to explicitly set the winding rule. HTH Gideon On 05/12/2009, at 7:22 AM,

Re: Draw rounded NSImage

2009-12-06 Thread Matt Neuburg
On or about 12/6/09 8:11 PM, thus spake cocoa-dev-requ...@lists.apple.com cocoa-dev-requ...@lists.apple.com: Date: Fri, 4 Dec 2009 14:22:04 -0700 From: John Wright mrjjwri...@gmail.com Subject: Draw rounded NSImage I am trying to create a NSImage or NSImageCell with rounded corners inside