Re: NSImageView frames
Re: NSImageView frames
- Subject: Re: NSImageView frames
- From: "M. Uli Kusterer" <email@hidden>
- Date: Sun, 28 Dec 2003 15:30:02 +0100
At 15:41 Uhr -0500 27.12.2003, Devon E Bowen wrote:
My image changes. It gets more transparent based on the settings of
a slider. So I have a drawRect method that composites the image as
needed. Or is there a better way to do that than subclassing
NSImageView? As someone pointed out, I was just missing the call to
[super drawRect] and now it seems to work fine.
The problem is that drawRect also draws the image. Which means your
code can draw as transparent as it likes, the superclass's drawRect:
will obliterate anything that would show through. The only thing
you'll see will be a 100% opaque image.
I think what you really want is to create a new NSImage, in which
you do your drawing, and then assign that NSImage to the NSImageView
using setImage.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.