Re: Redrawing CALayer subclass when super layer is scaled
Re: Redrawing CALayer subclass when super layer is scaled
- Subject: Re: Redrawing CALayer subclass when super layer is scaled
- From: David Duncan <email@hidden>
- Date: Mon, 21 Jul 2008 12:40:03 -0700
On Jul 20, 2008, at 4:04 PM, Rick Mann wrote:
David, I checked my code again, and realized I was setting the bias
to 1 (I thought I saw that in a sample). I don't really understand
how the numbers are interpreted, but when I set it higher (4, and
then 10), my layers started getting redrawn.
Its all powers of 2. Levels of detail is how many of them you have,
starting at 1. So if you set levelsOfDetail to 3, then you have 1,
1/2, 1/4. If you set it to 7 you add 1/8, 1/16. This effectively means
you have smaller representations of your data.
levelsOfDetailBias biases levelsOfDetail so that you can scale up as
well as down. So if we go back to levelsOfDetail set to 3, but set
levelsOfDetailBias to 1, then you get instead 2, 1, 1/2. If you set it
to 2, then you get 4, 2, 1. Setting this value greater than
levelsOfDetail-1 is may work (haven't tried it) but doesn't really
give you anything.
Effectively together you get the powers of 2 from
2^(levelsOfDetailBias) to 2^(levelsOfDetailBias-levelsOfDetail+1) for
your representations.
I'm not even sure I see a way to do that by writing my own animators
& renderers (I can't figure out how to subclass CARenderer, anyway).
You wouldn't want to subclass CARenderer anyway, I can't imagine
anything useful that you could get out of doing so.
--
David Duncan
Apple DTS Animation and Printing
email@hidden
_______________________________________________
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