0

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)

Satyam
  • 15,493
  • 31
  • 131
  • 244

2 Answers2

0

check flood fill library

http://gauravstomar.blogspot.com/2014/09/uiimage-fill-color-objective-c.html

hope it will help

user2168496
  • 492
  • 1
  • 4
  • 11
0

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

Iphone App: How to fill an image with empty areas with coregraphics?

Community
  • 1
  • 1
Ben
  • 2,982
  • 1
  • 16
  • 12