Search code examples
macoscocoadrawingcalayerquartz-scheduler

CALayer blurry for odd numbered sizes


I am setting the -contents property of a CALayer to various CGImageRefs and I noticed that when the image I set the contents to has an odd numbered size the image becomes blurry.

My layer frame itself is on pixel and I have it set to not resize its contents. Is there any way to force the layer to draw it's contents on pixel?


Solution

  • I had to set the anchorPoint to (0,0) and change my code to position my layer to account for half of the layer's size and make the new frames have integral locations.