Re: NSImage/NSImageView opacity (solved)

2008-10-27 Thread Randall Meadows
On Oct 24, 2008, at 10:27 PM, Randall Meadows wrote: On Oct 24, 2008, at 8:00 PM, Ken Ferry wrote: Yes, -cacheDisplayInRect:toBitmapImageRep: is going to end up calling drawRect:. It's not meant to be invoked _from_ drawRect:. You can call that from another view, or from a controller, or

Re: NSImage/NSImageView opacity

2008-10-24 Thread Randall Meadows
On Oct 24, 2008, at 8:00 PM, Ken Ferry wrote: Yes, -cacheDisplayInRect:toBitmapImageRep: is going to end up calling drawRect:. It's not meant to be invoked _from_ drawRect:. You can call that from another view, or from a controller, or whatever. That's what I'm doing; I am calling cach

Re: NSImage/NSImageView opacity

2008-10-24 Thread Ken Ferry
Yes, -cacheDisplayInRect:toBitmapImageRep: is going to end up calling drawRect:. It's not meant to be invoked _from_ drawRect:. You can call that from another view, or from a controller, or whatever. -Ken On Fri, Oct 24, 2008 at 5:07 PM, Randall Meadows <[EMAIL PROTECTED]> wrote: > On Oct 23, 2

Re: NSImage/NSImageView opacity

2008-10-24 Thread Randall Meadows
On Oct 23, 2008, at 9:11 PM, Ken Ferry wrote: Last, you might be interested in -[NSView cacheDisplayInRect:toBitmapImageRep:] as an alternate way of accomplishing the end goal. Take a gander at the 10.4 AppKit release notes, that have an explanatory section on this method. Search for "NSV

Re: NSImage/NSImageView opacity

2008-10-24 Thread Randall Meadows
On Oct 23, 2008, at 9:11 PM, Ken Ferry wrote: On Thu, Oct 23, 2008 at 6:20 PM, Randall Meadows <[EMAIL PROTECTED] pc.com> wrote: I *thought* the trick to doing this was to use clearColor, so I do this right after I create the NSImage and lock focus on it: [Boneheaded mistake pointed out in

Re: NSImage/NSImageView opacity

2008-10-24 Thread Randall Meadows
On Oct 23, 2008, at 7:53 PM, Jason Coco wrote: On Oct 23, 2008, at 21:20 , Randall Meadows wrote: The custom drawing doesn't fill up all the contents of the bounds of the view. Specifically, a black border is left around the outside of where I'm drawing. You can view a snapshot of what I'

Re: NSImage/NSImageView opacity

2008-10-23 Thread Ken Ferry
On Thu, Oct 23, 2008 at 6:20 PM, Randall Meadows <[EMAIL PROTECTED]> wrote: > > I'm doing some custom drawing in a custom view, but I need to capture that in > a reflected image. So in that custom view's subclassed -drawRect:, I'm > creating an NSImage, locking focus on that, doing all my drawin

Re: NSImage/NSImageView opacity

2008-10-23 Thread Jason Coco
On Oct 23, 2008, at 21:20 , Randall Meadows wrote: I'm doing some custom drawing in a custom view, but I need to capture that in a reflected image. So in that custom view's subclassed -drawRect:, I'm creating an NSImage, locking focus on that, doing all my drawing, then unlock focus. I t