title: Mask/Clip an Image using a Polygon in KineticJS
body: <p>Is it possible to mask/clip an <code>Image</code> using a <code>Polygon</code> in KineticJS?</p>
  
  <p><strong>JSfiddle:</strong> <a href="http://jsfiddle.net/LNeML/" rel="nofollow">http://jsfiddle.net/LNeML/</a></p>
  
  <p>In the jsfiddle, the Polygon should clip the Image of Yoda.</p>
  
  <p>I did not see any clipping function in the docs for KineticJS objects. I was looking for a simple way to clip an Image, something similar to EaselJS:</p>
  
  <pre><code>star = new createjs.Shape(); 
  star.graphics.beginStroke("#FF0").setStrokeStyle(5).drawPolyStar(0,0,50, 15,5,0.6).closePath();
  bitmap.mask = star;
  stage.addChild(bitmap);
  </code></pre>