Re: CALayer scale transform
Re: CALayer scale transform
- Subject: Re: CALayer scale transform
- From: David Duncan <email@hidden>
- Date: Wed, 11 Jun 2008 09:37:27 -0700
On Jun 11, 2008, at 8:56 AM, Brian Christensen wrote:
Is it expected behavior that when applying a
CATransform3DMakeScale() transform to a CALayer the layer's current
bitmap information is what gets scaled (using some type of filter)
rather than asking the layer to actually redraw itself into the,
presumably, freshly transformed context? Currently applying a scale
transform appears to result in unacceptable pixelation.
This is expected behavior.
I can't seem to find anything in the documentation on this behavior.
The relevant sections discuss it as "transforming a layer's
geometry." Maybe I'm not understanding something fundamental, but I
would have figured that a geometry transform wouldn't simply stretch
the existing device pixel based bitmap content using minification/
magnification filters to fit into the newly scaled unit size (at
least, from my understanding, this certainly isn't how a transform
applied to the drawing context would cause regular Cocoa drawing to
behave). I can understand this being done if the layer content is a
bitmap image to begin with, but I certainly wouldn't expect this to
be the case for text.
Effectively a CALayer represents a texture with the layer's contents
on the video card. As the docs say, transforms only affect geometry.
The texture does not include geometry, thus the current content is
scaled rather than being re-rendered. At even moderate zoom factors
scaling the content could cause issues with maximum texture sizes on
the video card your running on.
--
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