Re: Drawing over a transparent background
Re: Drawing over a transparent background
- Subject: Re: Drawing over a transparent background
- From: Ron Fleckner <email@hidden>
- Date: Wed, 2 Sep 2009 00:16:52 +1000
On 01/09/2009, at 11:31 PM, Dave Keck wrote:
For the record...
It's considered best practice to limit your drawRect: methods to
strictly drawing. Often it's handy to take advantage of drawRect: for
testing, but in production code, my original suggestion isn't a good
idea. 8)
In the past I've seen some nasty misuses of drawRect: (setting the
receiver's frame and such) which led to some even nastier bugs and
overall inelegant code. So yeah, my advice is to stick to drawing in
drawRect: and save yourself the pain later.
Right, and for the record, your advice to do this:
[[cView window] display];
[[cView window] invalidateShadow];
turned out to be the most reliable.
As you suggest, it seems the order of the calls is important.
Ron
_______________________________________________
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