title: How to redraw a stored CGPath as a Bezier path if the original CGPoints are lost
body: <p>How can I redraw a stored CGPath as a Bezier path if the original CGPoints were not stored? </p>
  
  <p>This is the code, but it does not work (the path is redrawn in standard mode rather than in Bezier mode):</p>
  
  <pre><code>CGMutablePathRef UpathFREEHAND = CGPathCreateMutable();
  CGPoint firstPointFH = [[pointArray objectAtIndex:0] CGPointValue];
  CGPathMoveToPoint(UpathFREEHAND, NULL, firstPointFH.x, firstPointFH.y);
  
  for (int i = 0; i &lt; [pointArray count]; i++)
      {
          CGPathAddLineToPoint(UpathFREEHAND, NULL, [[pointArray objectAtIndex:i] CGPointValue].x, 
          [[pointArray objectAtIndex:i] CGPointValue].y);
      }
  
  CGMutablePathRef _TempPathForUndo = UpathFREEHAND;
  
  //Add PATH object to array
  [UPath addObject:CFBridgingRelease(_TempPathForUndo)];
  
  //Load PATH object from array
  _TTempPathForUndo = (__bridge CGMutablePathRef)([UPath objectAtIndex:i]);
  
  // Now create the UIBezierPath object.
  UIBezierPath *bp;
  bp = [UIBezierPath bezierPath];
  bp.CGPath = _TTempPathForUndo;
  
  CGContextAddPath(context, bp.CGPath);
  //Color, Brush Size parameters, Line cap parameters..
  CGContextStrokePath(context);
  </code></pre>