Why is this Core Graphics drawing code generating variating line widths?
===

See the image. The form little rectangles have different line widths. The line pointing towards the big center rect are thicker. Take the top left one for instance: the to line and the left one are thinner than the right one and the bottom one.
First I though it was an optical illusion, but no. The screenshot was taken on the Simulator at 100%.

![enter image description here][1]

The code used to draw the view below is from DrawRect() of a subclass of UIView:

    public override void Draw (RectangleF rect)
    		{
    			rect = this.Bounds;
    			CGContext oCtx = UIGraphics.GetCurrentContext();
    			oCtx.SetFillColor(UIColor.Clear.CGColor);
    			oCtx.ClearRect(rect);
    
    			oCtx.SetLineWidth(2f);
    
    			oCtx.SetFillColor(this.BackgroundColor.CGColor);
    			oCtx.SetStrokeColor(this.BackgroundColor.CGColor);
    			oCtx.SetAlpha(this.Alpha);
    
    			oCtx.AddRect(new RectangleF(rect.X + HANDLE_WIDTH * 0.5f, rect.Y + HANDLE_HEIGHT * 0.5f, rect.Width - HANDLE_WIDTH, rect.Height - HANDLE_HEIGHT));
    
    			oCtx.FillPath();
    
    			oCtx.SetAlpha(1f);
    			oCtx.AddRect(new RectangleF(rect.X, rect.Y, HANDLE_WIDTH, HANDLE_HEIGHT));
    			oCtx.AddRect(new RectangleF(rect.Right - HANDLE_WIDTH, rect.Y, HANDLE_WIDTH, HANDLE_HEIGHT));
    			oCtx.AddRect(new RectangleF(rect.Right - HANDLE_WIDTH, rect.Bottom - HANDLE_HEIGHT, HANDLE_WIDTH, HANDLE_HEIGHT));
    			oCtx.AddRect(new RectangleF(rect.X, rect.Bottom - HANDLE_HEIGHT, HANDLE_WIDTH, HANDLE_HEIGHT));
    
    			oCtx.StrokePath();
    
    #if DEBUG
    			oCtx.SetAlpha(0.2f);
    			oCtx.SetFillColor(UIColor.DarkGray.CGColor);
    			oCtx.AddRect(this.GetMovableArea(rect));
    			oCtx.FillPath();
    #endif
    		}


Can somebody please explain why the stroke widths differ? I also tried to use StrokeRect() instead - same result. I even removed all the drawing code, except the top left rectangle without change. The constants HANDLE_HEIGHT and HANDLE_WIDTH are both set to 20f.

  [1]: http://i.stack.imgur.com/muGwj.png


