How can I get an array with all the CGPoint
(s) contained in a given CGPath
(CGMutablePathRef
)?
You can use CGPathApply() to iterate over every segment in the path and run a custom function with that segment. That will give you all the information the path has.
However, if by "all the CGPoint(s)", you meant every point that has a pixel rendered to it, that's an infinitely-sized set. Although you could certainly use the apply function to get each segment, and then for every non-move segment, evaluate your own math with the segment's control points to get a list of points at whatever density you want.