title: Drawing path stroke and shadow (iOS)
body: <p>I'm using this code to create a rounded cornered image:</p>
  
  <pre><code>CGContextBeginPath(context);
  CGRect rect = CGRectMake(0, 0, imageObj.size.width, imageObj.size.height);
  
      CGContextAddRect(context, rect);
  
  
  CGContextSaveGState(context);
  CGContextTranslateCTM (context, CGRectGetMinX(rect), CGRectGetMinY(rect));
  CGContextScaleCTM (context, ovalWidth, ovalHeight);
  fw = CGRectGetWidth (rect) / ovalWidth;
  fh = CGRectGetHeight (rect) / ovalHeight;
  CGContextMoveToPoint(context, fw, fh/2);
  CGContextAddArcToPoint(context, fw, fh, fw/2, fh, 1);
  CGContextAddArcToPoint(context, 0, fh, 0, fh/2, 1);
  CGContextAddArcToPoint(context, 0, 0, fw/2, 0, 1);
  CGContextAddArcToPoint(context, fw, 0, fw, fh/2, 1);
  CGContextRestoreGState(context);
  
  CGContextClosePath(context);
  CGContextClip(context);
  
  CGContextDrawImage(context, CGRectMake(0, 0, w, h), imageObj.CGImage);
  </code></pre>
  
  <p>How can I add a stroke and shadow?</p>
  
  <p>Didn't work for me so far...</p>
  
  <p>Thank you!</p>