Re: Threaded drawing
Re: Threaded drawing
- Subject: Re: Threaded drawing
- From: Ken Thomases <email@hidden>
- Date: Wed, 11 Dec 2013 05:40:44 -0600
On Dec 11, 2013, at 4:20 AM, Graham Cox wrote:
> The documentation is sparse though, I’m not quite sure what I should be using for -levelsOfDetail and -levelsOfDetailBias. It’s clear I do need to set these to something other than their defaults to get the behaviour I need, which is not to pixelize my vector drawing as I zoom in. The defaults do show pixelization.
By searching the docs for "levelsOfDetailBias", I found Apple's CALayerEssentials sample code. A section of the AppController.m sets these properties and has a comment which explains them fairly well:
// To provide multiple levels of content, you need to set the levelsOfDetail property.
// For this sample, we have 5 levels of detail (1/4x - 4x).
// By setting the value to 5, we establish that we have levels of 1/16x - 1x (2^-4 - 2^0)
// we use the levelsOfDetailBias property we shift this up by 2 raised to the power
// of the bias, changing the range to 1/4-4x (2^-2 - 2^2).
exampleCATiledLayer.levelsOfDetail = 5;
exampleCATiledLayer.levelsOfDetailBias = 2;
Why such a clear explanation isn't in the class reference, I couldn't tell you.
Regards,
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