How can I combine CGPathCreateCopyByDashingPath() and CGPathCreateCopyByStrokingPath() to stroke a dashed CGPath on OS X?
问题 Core Graphics has two functions, CGPathCreateCopyByDashingPath() and CGPathCreateCopyByStrokingPath() , that both take a CGPath that you want to stroke and convert it into its equivalent fill. I need to do this so I can, for example, stroke a line with a gradient: call CGPathCreateCopyByStrokingPath() , load the path into the CGContext, call CGContextClip() , and then draw the gradient. However, CGPathCreateCopyByStrokingPath() accepts line stroking parameters like line cap, line join, etc.,