Monday, July 4, 2011

Drawing in CAShapeLayer versus CALayer

When drawing in a CAShapeLayer you can have a frame that has a width and height of 1 and drawing in the layer outside the frame and bounds will work as long as maskToBounds is not set to YES which is the default.  However, in a CALayer Quartz can only draw within the frame and bounds of the layer.  Stumbled across this when trying to create layers as small as possible to reduce memory usage and noticed that CAShapeLayer's rendered while CALayers did not render a drawing along the same path.

No comments:

Post a Comment