title: Weird anti-aliasing in custom view
body: <p>I have a custom <code>UIView</code> which is drawn using its <code>-[drawRect:]</code> method.</p>
  
  <p>The problem is that the anti-aliasing acts very weird as black lines horizontal or vertical lines are drawn very blurry.</p>
  
  <p>If I disable anti-aliasing with <code>CGContextSetAllowsAntialiasing</code>, everything is drawn as expected.</p>
  
  <p>Anti-Aliasing:<br>
  <a href="http://dustlab.com/stuff/antialias.png">alt text http://dustlab.com/stuff/antialias.png</a></p>
  
  <p>No Anti-Aliasing (which looks like the expected result with AA):<br>
  <a href="http://dustlab.com/stuff/no_antialias.png">alt text http://dustlab.com/stuff/no_antialias.png</a></p>
  
  <p>The line width is exactly 1, and all coordinates are integral values.</p>
  
  <p>The same happens if I draw a rectangle using <code>CGContextStrokeRect</code>, but not if I draw exactly the same <code>CGRect</code> with <code>UIRectStroke</code>.</p>