title: Adding multiple exclusion paths in CGMutablePath
body: <p>I was following the <a href="https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/CocoaDrawingGuide/Paths/Paths.html#//apple_ref/doc/uid/TP40003290-CH206-BAJIJJGD" rel="nofollow noreferrer">winding rules documentation</a> provided for <code>fillRule</code> property which is used for trying to identify rather a point lies inside the region or not. 
  My problem is trying to add multiple path exclusions in a path as below. I was trying to debug this in playground but couldn't identify how it is working and what was needed to achieve the result. The problem arises when i add more than one arc in a same line.</p>
  
  <p>The results are funny:</p>
  
  <p><a href="https://i.stack.imgur.com/iuDHk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iuDHk.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/VI66u.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VI66u.png" alt="enter image description here"></a></p>
  
  <pre><code>    let maskView = UIView(frame: UIScreen.main.bounds)
      view.addSubview(maskView)
      maskView.backgroundColor = UIColor.black.withAlphaComponent(0.7)
      //
      let path = CGMutablePath()
  
      path.addArc(center: CGPoint(x: 20, y: 20),
                  radius: 10,
                  startAngle: 0, endAngle: 2 * .pi,
                  clockwise: false)
  
      path.addArc(center: CGPoint(x: 220, y: 20),
                  radius: 10,
                  startAngle:  0, endAngle: 2 * .pi,
                  clockwise: false)
  
      path.addArc(center: CGPoint(x: 100, y: 300),
                  radius: 12,
                  startAngle: 0, endAngle: 2 * .pi,
                  clockwise: false)
  
  
      path.addRect(CGRect(origin: .zero, size: UIScreen.main.bounds.size))
  
  
  
  
      let maskLayer = CAShapeLayer()
      maskLayer.backgroundColor = UIColor.black.cgColor
      maskLayer.path = path
      maskLayer.fillRule = .evenOdd
      maskView.layer.mask = maskLayer
  </code></pre>
  
  <p>The code provided by Apple does this very easily here:
  <a href="https://developer.apple.com/documentation/quartzcore/cashapelayer" rel="nofollow noreferrer">Flower pattern</a></p>