I have an NSWindow with a NSView (stored in a nib):
I'm trying to add a BezierPath to a layer for that view (self.view2):
CAShapeLayer* circleLayer = [CAShapeLayer layer];
[self.view2 setLayer:circleLayer];
circleLayer.fillColor = [NSColor redColor].CGColor;
circleLayer.path = [NSBezierPath bezierPathWithOvalInRect:self.view2.bounds].quartzPath;
circleLayer.strokeColor = [NSColor blueColor].CGColor;
circleLayer.strokeStart = 0.0f;
circleLayer.strokeEnd = 0.5f;
circleLayer.lineWidth = 5.0f;
circleLayer.transform = CATransform3DMakeRotation(135.0 / 180.0 * M_PI, 0.0, 0.0, 1.0);
This is what I get back:
Why isn't the resulting view aligned properly (i.e., top right like it's on my nib)?