title: How to add circle annotation in pdfkit swift?
body: <p>I am using pdfkit and added circle annotation with fixed size and width but i want to draw with dynamic height and width. Here is my code :</p>
  
  <p><strong>Here : start is my CGPoint from where i start to finger 
        end is second CGPoint where i ended to move finger.
        Used start.x and end.y</strong> </p>
  
  <pre><code>  let circle = PDFAnnotation(bounds: CGRect(x: start.x, y: end.y, width: 100, height: 100), forType: .circle, withProperties: nil)
    circle.color = hexStringToUIColor(hex: "#0000FF")
  
    let border = PDFBorder()
    border.lineWidth = 3.0
    circle.border = border
    page?.addAnnotation(circle)
  </code></pre>
  
  <p>This is second approach to draw circle with dynamic height and width:</p>
  
  <p>Here is code :</p>
  
  <pre><code>    let centerX = (start!.x + end!.x)/2
  
      let centerY = (start!.y + end!.y)/2
  
      var distance = (end!.x - centerX) * 2
  
      if distance &lt; 0 {
  
           distance = (start!.x - centerX) * 2
  
      }
  
      let halfDistance = distance/2
  
      self.annotation = PDFAnnotation(bounds: CGRect(x: centerX - halfDistance, y: centerY - halfDistance, width: distance, height: distance), forType: .circle, withProperties: nil)
  
      let page = self.pdfview.currentPage
  
      annotation.color = hexStringToUIColor(hex: "#0000FF")
  
      let border = PDFBorder()
      border.lineWidth = 3.0
      annotation.border = border
      page?.addAnnotation(annotation)
  </code></pre>
  
  <p>Second approach draws circle with dynamic height and width but not as i want. if i draw circle their are 8 cases :</p>
  
  <ol>
  <li>Finger swiped from left to right - It draw circle on proper position.</li>
  <li>Finger swiped from right to left - It draw circle on proper position.</li>
  <li>Finger swiped from top left to bottom right - It draw circle half of size</li>
  <li>Finger swiped from bottom right to top left - It draw circle half of size</li>
  <li>Finger swiped from top to bottom - circle radius value is 2 or 3 width and height</li>
  <li>Finger swiped from bottom to top - circle radius value is 2 or 3 width and height</li>
  <li>Finger swiped from top right to bottom left - It draw circle half of size</li>
  <li>Finger swiped from bottom left to top right - It draw circle half of size</li>
  </ol>