title: Clipping shadows created by CALayer.shadow
body: <p>I want to add a shadow around the OUTSIDE edge of a HOLLOW CGPath (those two words being critical: outside + hollow :) ).</p>
  
  <p>Apple's shadow implementation only allows you to do "filled" shadows.</p>
  
  <p>So ... how to clip-away the inside part of the shadow itself? If it were a render call, I'd call CGContextSetClip* methods to clip it to where I wanted it ... but I can't see how you'd get at it, since it's neither a render call, nor a CALayer itself.</p>
  
  <p>(an unfortunate consequence of Apple "hiding" it as a set of magic variables, I guess?)</p>
  
  <p>NB: this is iOS only - IIRC on Mac you have direct access to the filters used to create shadows, so you can create your own (arbitrary) shadows by hand.</p>
  
  <hr>
  
  <p>UPDATE:</p>
  
  <p>I worked out how to clip to show only the INNER part of the shadow: set the "layer.mask", to be a new layer that's a clone of the current layer (i.e. same path), and set the path fillcolor to anything with full alpha.</p>
  
  <p>This is the opposite of what I'm trying, so if I could figure a way to get the mask layer to flip alpha (0 becomes 1, 1 becomes 0), I'd be there...</p>