title: Prevent UIImage from resizing when - drawInRect: is called
body: <p>I'm rendering UIImage in the <code>- drawRect:</code> and placing it in the passed in <code>CGRect</code> by calling <code>drawInRect: rect</code> on the UIImage. It automatically resizes and stretches itself, which I don't want. How can I keep it the original size? </p>
  
  <pre><code>UIImage* left = [UIImage imageNamed: @"Map_info_bubble_left"];
  UIImage* center = [UIImage imageNamed: @"Map_info_bubble_center"];
  UIImage* right = [UIImage imageNamed: @"Map_info_bubble_right"];
  
  UIImage* leftCapStretched = [left resizableImageWithCapInsets: UIEdgeInsetsMake(0, 20, 0, 0)];
  UIImage* rightCapStretched = [right resizableImageWithCapInsets: UIEdgeInsetsMake(0, 0, 0, 15)];   
  
  CGFloat fullWidth = leftCapStretched.size.width + center.size.width + rightCapStretched.size.width;
  
  UIGraphicsBeginImageContextWithOptions(CGSizeMake(fullWidth, center.size.height), NO, 0);
  [leftCapStretched drawAtPoint: CGPointMake(0, 0)];
  [center drawAtPoint: CGPointMake(leftCapStretched.size.width, 0)];
  [rightCapStretched drawAtPoint: CGPointMake(left.size.width + center.size.width, 0)];
  UIImage* callout = UIGraphicsGetImageFromCurrentImageContext();
  UIGraphicsEndImageContext();
  
  [callout drawInRect: rect];
  </code></pre>
  
  <p>Essentially what is happening is the center image should remain the original size while the caps stretch, but the center is stretching and the caps don't stretch enough. I noticed that if I multiply <code>fullWidth</code> by 2, it shrinks the center closer to what it should be.</p>
  
  <p>EDIT: More simply asked after reading the documentation a bit more, is there a way to prevent the UIImage from scaling to fit the rect when <code>drawInRect:</code> is called? </p>