I am starting to develop applications for Iphone and wondering if the following can be done:
I have a .png image, which is a simple drawing of a shape bounded by black edges and empty areas. I wonder if there is a method or mode for filling closed empty areas of the image.
It looks like a MSpaint filling pot.
I have this code:
CGContextRef ctx = UIGraphicsGetCurrentContext(); UIImage *image = [UIImage imageNamed:@"myImage.png"]; CGContextDrawImage(context, CGRectMake(0, 0, 145, 15), image.CGImage); [image drawInRect:CGRectMake(0, 0, 145, 15)];
Now I do not know what to do to fill out ...
I would really appreciate it if someone could answer this question. Thank you very much!
source share