title: Generate a CGPath from another path's line width outline
body: <p>I might not be explaining this in the best way possible, so please bear with me.</p>
  
  <p>What I have is a drawn CGPath on top of a MKMapView object:</p>
  
  <p><img src="https://dl.dropboxusercontent.com/u/361124/stackoverflow/path_line.png" /></p>
  
  <p>The way I was able to achieve this is to create a CGPath for the darker blue line, then create a copy of that path, and then stroke a thicker version of it with a semi-transparent blue color. Here's the code that I'm currently using for this:</p>
  
  <pre><code>    // set the shadow around the path line
      CGContextRef context = UIGraphicsGetCurrentContext();
      CGContextSaveGState(context);
      CGContextSetRGBStrokeColor(context, 0.0f, 0.0f, 0.0f, 0.0f);
      CGContextSetRGBFillColor(context, 0.0f, 0.0f, 1.0f, 0.4f);
      CGPathRef shadowPath = CGPathCreateCopyByStrokingPath(self.path.CGPath, NULL, 80.0f, kCGLineCapRound, kCGLineJoinRound, 0.0f);
      CGContextBeginPath(context);
      CGContextAddPath(context, shadowPath);
      CGContextDrawPath(context, kCGPathFillStroke);
      CGContextRestoreGState(context);
      CGPathRelease(shadowPath);
  </code></pre>
  
  <p>Works pretty well, nothing wrong so far.</p>
  
  <p>However, what I would like to do though is to get a CGPathRef of the outline of that thicker semi-transparent blue area. Here's another screenshot showing the pseudo-path that I want out of this (hand drawn in red):</p>
  
  <p><img src="https://dl.dropboxusercontent.com/u/361124/stackoverflow/path_line_what_i_want.png" /></p>
  
  <p>How is this possible?</p>