title: CoreGraphics line appears to change size?
body: <p>I have this line around my shape:</p>
  
  <p><img src="https://i.stack.imgur.com/eqohb.png" alt="enter image description here"></p>
  
  <p>The problem is, it obviously goes from 1px thick, to 2px. Here's the code I'm using:</p>
  
  <pre><code>CGContextRef context = UIGraphicsGetCurrentContext();
      CGContextClearRect(context, rect);
  
      CGContextSetFillColorWithColor(context, [BUTTON_COLOR CGColor]);
      CGContextSetStrokeColorWithColor(context, [[UIColor blackColor] CGColor]);
      CGContextSetLineWidth(context, 1);
  
      int radius = 8;
  
  
      CGContextMoveToPoint(context, 0, self.frame.size.height / 2);
  
      CGContextAddLineToPoint(context, POINT_WIDTH, self.frame.size.height);
  
      CGContextAddLineToPoint(context, rect.origin.x + rect.size.width - radius, 
                              rect.origin.y + rect.size.height);
  
      CGContextAddArc(context, rect.origin.x + rect.size.width - radius, 
                      rect.origin.y + rect.size.height - radius, radius, M_PI / 2, 0.0f, 1);
  
      CGContextAddLineToPoint(context, rect.origin.x + rect.size.width, rect.origin.y + radius);
  
      CGContextAddArc(context, rect.origin.x + rect.size.width - radius, rect.origin.y + radius, 
                      radius, 0.0f, -M_PI / 2, 1);
  
      CGContextAddLineToPoint(context, POINT_WIDTH, 0);
  
      CGContextAddLineToPoint(context, 0, self.frame.size.height / 2);
  
      CGContextClosePath(context);
      CGContextDrawPath(context, kCGPathFillStroke);
  </code></pre>
  
  <p>Any ideas?</p>