Drawing with Core Graphics looks chunky on Retina display

I have a UIView that draws a circle from inside drawRect:rect. After reading the Apple dev info on the Retina display, it seemed like using Core Graphics meant that the drawings would automatically take advantage of the higher res. This simple circle, however, looks pretty chunky as compared to a similar circle in a badge icon. Obviously I’m comparing it to something that has gloss and shadow but I think it’s pretty obvious that mine is not being drawn as well. I tried taking screenshots of apple’s icon badge and my circle and they look about the same on my mac – the difference is obvious when looking at each on the phone, though. Is there something simple I’m missing here?

This is the drawing code that I’m using in drawRect:rect

  • Operation Queue vs Dispatch Queue for iOS Application
  • iOS Autolayout: two buttons of equal width, side by side
  • How to perform binary search on NSArray?
  • First frame of a video using AVFoundation
  • Setting up a plist to store application data (not settings) for an iPhone game
  • Screen orientation ios
  • UIBezierPath* aPath = [UIBezierPath bezierPathWithOvalInRect:
                           CGRectMake(0, 0, 22, 22)];
    
    [[UIColor whiteColor] setStroke];
    [[UIColor redColor] setFill];
    
    CGContextRef aRef = UIGraphicsGetCurrentContext();
    CGContextTranslateCTM(aRef, 10, 10);
    aPath.lineWidth = 3;
    [aPath fill];
    [aPath stroke];
    

    Thanks for any help,
    Rob

    Solutions Collect From Internet About “Drawing with Core Graphics looks chunky on Retina display”

    Oops, it needed antialiasing first:

    CGContextRef context = UIGraphicsGetCurrentContext();
    CGContextSetShouldAntialias(context, YES);
    

    I added this before drawing, then set it to NO and drew another circle immediately afterward. The two circles, side by side, show that this was the problem.