• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Threaded drawing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Threaded drawing
      • From: Graham Cox <email@hidden>
References: 
 >Threaded drawing (From: Graham Cox <email@hidden>)
 >Re: Threaded drawing (From: Graham Cox <email@hidden>)
 >Re: Threaded drawing (From: Roland King <email@hidden>)
 >Re: Threaded drawing (From: Graham Cox <email@hidden>)
 >Re: Threaded drawing (From: Roland King <email@hidden>)
 >Re: Threaded drawing (From: Graham Cox <email@hidden>)
 >Re: Threaded drawing (From: Graham Cox <email@hidden>)
 >Re: Threaded drawing (From: Seth Willits <email@hidden>)
 >Re: Threaded drawing (From: Graham Cox <email@hidden>)
 >Re: Threaded drawing (From: Jens Alfke <email@hidden>)
 >Re: Threaded drawing (From: Kyle Sluder <email@hidden>)
 >Re: Threaded drawing (From: Graham Cox <email@hidden>)
 >Re: Threaded drawing (From: Seth Willits <email@hidden>)
 >Re: Threaded drawing (From: Kyle Sluder <email@hidden>)
 >Re: Threaded drawing (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Threaded drawing
  • Next by Date: Re: Threaded drawing
  • Previous by thread: Re: Threaded drawing
  • Next by thread: Re: Threaded drawing
  • Index(es):
    • Date
    • Thread