title: Core Graphics drawing a square result in rectangle
body: <p>I am trying to draw a square in my context, but it results in a rectangle with a short and longer side. (in my ipad retina simulator)</p>
  
  <p>This is part of the drawRect method of my view object:</p>
  
  <pre><code>CGContextRef context = UIGraphicsGetCurrentContext();
  
  CGFloat minx = 0;
  CGFloat maxx = 45 - 1;
  CGFloat miny = 0;
  CGFloat maxy = 45 - 1;
  
  CGContextSetLineWidth(context, 1.0);
  
  CGContextSetStrokeColorWithColor(context, [UIColor whiteColor].CGColor);
  CGContextMoveToPoint(context, minx, maxy);
  CGContextAddLineToPoint(context, minx, miny);
  CGContextAddLineToPoint(context, maxx, miny);
  CGContextStrokePath(context);
  
  CGContextSetStrokeColorWithColor(context, [UIColor redColor].CGColor);
  CGContextMoveToPoint(context, maxx, miny);
  CGContextAddLineToPoint(context, maxx, maxy);
  CGContextAddLineToPoint(context, minx, maxy);
  CGContextStrokePath(context);
  </code></pre>
  
  <p>What am I doing wrong? Do I need to set an aspect ratio or something?</p>
  
  <p>Edit:
  I found out that </p>
  
  <pre><code>CGContextScaleCTM(context, 1, 0.75f);
  </code></pre>
  
  <p>makes the result square again, but the end result is not spot on.
  Does anybody know why I need to correct the vertical scale?</p>