title: How to draw inside the black edges in iOS SDK with OpenGL ES?
body: <p>Refer the below-attached images, how to paint inside the black edges without using masking [Ex- If we want to draw inside the cap, perfectly we need to fill the cap using brush tool].</p>
  
  <p>We have already implemented bucket tool using flood fill algorithm.</p>
  
  <p>Refer [IMAGE 4] this type of drawing is wrong, So we need to draw only inside the black edges refer [IMAGE 2] and [IMAGE 3].</p>
  
  <p>We need to implement this in iOS SDK,</p>
  
  <p>I have already tried these two ways -</p>
  
  <ol>
  <li><p>I have recorded the coordinates of a specific area, it's lagging too much and the memory leak is there. it's not a good way</p></li>
  <li><p>I have to fill specific area using bucket tool (flood fill algorithm) in the background, then try to match the color of the touch point. It also not gives the perfect output.</p></li>
  </ol>
  
  <p>[IMAGE 1]</p>
  
  <p><a href="https://i.stack.imgur.com/OOV7Im.png" rel="noreferrer"><img src="https://i.stack.imgur.com/OOV7Im.png" alt="enter image description here"></a></p>
  
  <p>[IMAGE 2]</p>
  
  <p><a href="https://i.stack.imgur.com/PhXN0m.png" rel="noreferrer"><img src="https://i.stack.imgur.com/PhXN0m.png" alt="enter image description here"></a></p>
  
  <p>[IMAGE 3]</p>
  
  <p><a href="https://i.stack.imgur.com/HTAHVm.png" rel="noreferrer"><img src="https://i.stack.imgur.com/HTAHVm.png" alt="enter image description here"></a></p>
  
  <p>[IMAGE 4]</p>
  
  <p><a href="https://i.stack.imgur.com/c1HDHm.png" rel="noreferrer"><img src="https://i.stack.imgur.com/c1HDHm.png" alt="enter image description here"></a></p>