Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CALayer content looks "blurry"



On Jan 17, 2008, at 7:38 AM, Michael wrote:

in the past several days I was playing with Core Animation. I'm playing with an app holding images and bezier path as content of a view. I moved the view drawing operation "into" a CALayer. Comparing the output of the "old" view based drawing with the CALayer output, the CALayer output looks blurry. For example the images are not as crisp in the details and the lines drawn by the bezier path are not as sharp as drawn in the view.


Are you sure the layer is placed on an integer boundary? If the layer is not placed on an integral boundary then it will show interpolation artifacts (which typically makes a layer look blurry). If your setting the frame you can usually fix this by making sure that the frame is passed through CGRectMakeIntegral() before you set it on the layer. If your setting the position then you need to account for the anchorPoint and the size of the layer to make sure that it is set integrally (it might be easier to calculate a frame and then set that instead).

This may also be caused by having set a transform on the layer or a parent layer (via either the transform or sublayerTransform properties). If these scale the coordinate system in some way then you may be seeing the layer contents scaled. Core Animation always uploads layer content at the size of the layer, not at its scaled size, so this could also be causing your issues.
--
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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >CALayer content looks "blurry" (From: Michael <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.