What I want to do is color an irregular shape when user touch within that path.
Same as flood fill. But I found that flood fill is too costly in case of performance/speed/memory. So I have an idea. I dont know how to implement it. CGContextFillPath fills an irregular shapes.
So my Question is can we get a bounding paths/border line of that shape so that we can color that region??
It sounds like you have an image with a shape in it, where all the pixels in the shape are one color, and the boundary of the shape is a different color.
If I understand you correctly, you would have to use a flood-fill algorithm to find the boundary of the shape so you could turn that boundary into a
CGPath. There’s no magic way to get a path for the boundary of the shape without looking at the pixels.