title: NSBezierPath with rounded rect does not have smooth corners
body: <p>I'd like to create a rounded rect similar to the one around the labels (while editing) in AddressBook. I am trying to use a bezierPath with a rounded rect and then stroking it to do this. But, the end result doesn't have very smooth edges.</p>
  
  <p>Address Book label</p>
  
  <p><a href="https://i.stack.imgur.com/ytUC9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ytUC9.png" alt="AddressBook label"></a></p>
  
  <p>Address Book label zoomed in pixie</p>
  
  <p><a href="https://i.stack.imgur.com/NE1do.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NE1do.png" alt="AddressBook label zoomed in pixie"></a></p>
  
  <p>My label</p>
  
  <p><a href="https://i.stack.imgur.com/ovoRt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ovoRt.png" alt="My label"></a></p>
  
  <p>My label zoomed in pixie</p>
  
  <p><a href="https://i.stack.imgur.com/U0KSz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/U0KSz.png" alt="My label zoomed in pixie"></a></p>
  
  <p>It looks like the curves in the addressbook version are more aggressively mixed towards the background white color. In Pixie, the pixel I have my cursor on has a sRGB value of (0.98, 0.98, 0.98), wheras in my version it is (0.86, 0.86, 0.86) resulting in a bit of jagged edge.
  My code to draw the rect is </p>
  
  <pre><code>override func drawWithFrame(cellFrame: NSRect, inView controlView: NSView) {
      if let context = NSGraphicsContext.currentContext() {
          context.saveGraphicsState()
          let borderColor = NSColor.init(SRGBRed: 0.75, green: 0.75, blue: 0.75, alpha: 1)
          let outline = NSBezierPath.init(roundedRect: cellFrame, xRadius: 4, yRadius: 4)
          outline.lineWidth = 4
          borderColor.setStroke()
          outline.stroke()
  
          drawInteriorWithFrame(cellFrame, inView: controlView)
          context.restoreGraphicsState()
      }
  }
  </code></pre>
  
  <p>I have tried playing around with different compositing types, line widths and xy radiuses for the round rect - without much success. I would appreciate some guidance on this. Thanks</p>