views:

257

answers:

1

Hi,

What is the CGMutablePathRef equivalent of CGContextSetLineJoin? CGContextSetLineJoin works directly on the graphics context, so requires a CGContextRef parameter, which I do not have since I'm working with CGMutablePathRef. I can't find anything in CGPath.h that does CGContextSetLineJoin's job.

Thank you.

+1  A: 

Using CGMutablePathRef, you are just defining a path. It's not until you paint the path that you can use functions like CGContextSetLineJoin. Cf. Apple's documentation:

You must call a painting function to fill or stroke the path because creating a path does not draw the path.

Don
Thanks Don. NSBezierPath is also a path and it does have a setLineJoinStyle method. The path itself has this attribute, and you set it before painting. This just tells the system "when you draw this path, draw it with this line join style". But of course, NSBezierPath is not available in the iPhone SDK. I was looking for something similar for the iPhone sdk.
johnnyMac