How to flood fill with Color of pattern image in swift?

485 Views Asked by At
  • I have achieved to flood fill on the close boundary with solid color.
  • Now I am trying to fill close boundary with UIColor but it is pattern image color (Pattern color).
  • I also try to get points of close area where i tap and fill that area with use of bezier path, but it took too much time to get an array of close boundary area points.
  • Please help me to achieve to fill pattern on UIImage object to specific close boundary area.
1

There are 1 best solutions below

1
nine stones On

Did you try:

let patternColor = UIImage(patternImage: <your UIImage>)