Re: Replace -lockFocus with Block-Based Drawing Method
Re: Replace -lockFocus with Block-Based Drawing Method
- Subject: Re: Replace -lockFocus with Block-Based Drawing Method
- From: Jerry Krinock <email@hidden>
- Date: Tue, 30 Dec 2014 20:42:31 -0800
> On 2014 Dec 30, at 20:22, Ken Thomases <email@hidden> wrote:
>
> Why are you using -lockFocus inside of -drawRect:?
Well, I would say because I never paid much attention to drawing, and copied or inherited that code from someone else :)) Anyhow, I just deleted -lockFocus and -unlockFocus from three -drawRect: methods and by golly they still work just fine. Done!
> The intent of the guideline is that drawing that is done once and then reused over time is prone to becoming mismatched to the ultimate on-screen destination. A screen, window, or view may change from high-resolution to standard-resolution or vice versa. Views and windows will redraw themselves in response to that, so the drawing will be appropriate to the destination. However, if you draw images at one point in time and then reuse them, they will be cached at a particular resolution and won't be re-rendered for the new resolution of the destination when drawn. They may end up looking blocky or blurry as a result. So, you are encouraged to use a technique that allows them to be re-rendered as necessary.
Yes, that makes sense. Thank you, Ken.
_______________________________________________
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