Re: NSImageView frames
Re: NSImageView frames
- Subject: Re: NSImageView frames
- From: Devon E Bowen <email@hidden>
- Date: Mon, 29 Dec 2003 17:57:55 -0500 (EST)
>
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.
Well, like I said, it's working fine. I just make a call to [super
drawRect] at the start of my drawRect method. It makes sense that it
works because my drawing comes after the superclass draws the frame.
So it wouldn't have a chance to opaque the 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.
I initially thought about that but couldn't figure out how to draw
into an NSImage. The composite methods seem to only work with a view
of some type. And all the examples of using composite methods work
inside of a view. So I put them inside of an NSImageView and not
only does it work, but the code looks rather natural there.
Devon
_______________________________________________
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.