views:

16

answers:

1

I'm trying to create an app for children. It will have different images. And those images will have different closed shapes like stars, balls or any other similar images. I am aware of how to draw on iphone. I know how to select a color, how to change the brush size etc.

What I want to know is to select a color and on touch of image, it has to flood fill the closed area around touched co-ordinate. Is it possible? How can I do it? (For example, if I touch inside the ball, the ball must be filled with one color)

A: 

I think you need to use blending for that, see this answer:

http://stackoverflow.com/questions/3921548/iphone-app-how-to-fill-an-image-with-empty-areas-with-coregraphics

Ben