Re: CALayer unwanted blurring
Re: CALayer unwanted blurring
- Subject: Re: CALayer unwanted blurring
- From: Matt Long <email@hidden>
- Date: Sun, 18 Jan 2009 16:33:19 -0700
Joe,
Can you post some code? We can't really know what might be the cause
without it.
Thanks.
-Matt
On Jan 17, 2009, at 5:30 PM, Joe Wildish wrote:
I am sub-classing CALayer and experiencing some strange behaviour.
Sometimes the content of one of my sub-classes is blurred. I can't
figure out why.
The content for the sub-classed layers is being provided by
drawInContext:(CGContextRef)ctx. I am using the NS APIs rather than
Core Graphics, although I did notice the same problem when I
initially started coding with CG (I switched to NS as I have some
legacy code that I should be able to drop straight in, so thought
I'd save a bit of time by not having to convert it all...).
Here's an example screenshot of the problem - http://www.elusive.cx/CALayer_blur.png
The circle and the rectangle are separate layer sub-classes. In both
cases, the bezier paths are being filled at co-ordinates that are
integers. Both the attributed strings are being rendered at points
whereby the co-ordinates are integers. I'm not doing anything
special with the graphics context, so really can't see why the text
in the rectangle is being blurred, and the text in the circles is
not ... :(
Anyway, I did find a post on this list that mentions a similar
problem (http://www.cocoabuilder.com/archive/message/cocoa/2008/12/13/225352
). However, in my case I am not applying any transforms to the layer
hierarchy, and I am also ensuring that the frame origin of each
object is drawn at a "whole number" point (both of these things are
mentioned as potential causes in that thread).
Any help would be appreciated.
Thanks in advance,
-Joe
_______________________________________________
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