My app allows you to draw using a variety of tools. One of them lets you make an angle: you tap three times, then an angle is drawn for you. Unfortunately, it gets really pointy but then rounded again at certain angles for some reason. I'm using
CGContextSetLineCap(context, kCGLineCapRound);
Here is a picture to exemplify what I'm talking about:
Does anyone know what causes this or how to fix it so it is round all the time??
For the most part, all I do is:
CGContextMoveToPoint(context, first.x, first.y);
CGContextAddLineToPoint(context, second.x, second.y);
CGContextAddLineToPoint(context, third.x, third.y);
then stroke.
That's controlled by your line join style, not your line cap style.
The default line join style is miter, and it looks like you're hitting the miter limit, which is why it becomes round at some angle. (See CGContextSetMiterLimit).