I have created a complex UIBezierPath that is composed of several path segments, solid, dashed, lines, colors, arcs, etc. So I have this and now I want to render it to a CGContext.
So, I convert it to a CGPathReference using
CGPathRef cgPath = CGPathCreateCopy(aBezierPath.CGPath);
The problem is this: in theory, if I want to draw a path on a CGContext, I have to define the stroke width, color, line style, blending mode, etc. for each segment that needs to be different, but the UIBezierPath I have already created contains all this information.
So, I wonder if there is a way to just to "stamp" the CGPath as it is on the CGContext, so it will be stamped with all the original information?
thanks.