title: How to replace a shape with an image in Canvas js?
body: <p>I am trying to replace the ellipse shape below with an image file. </p>
  
  <pre><code>/* this is the image variable I'm trying to use to replace the shape*/
  var img = new Image();
  img.addEventListener('load', function(e) {
      canvas.drawImage(this, 0, 0, 400, 400);
  }, true);
  img.src="img/crystal.png";
  
  /* this is circle shape I'm trying to replace*/
  
      stroke(0);
      fill(175);
      ellipse(xpos, ypos, 32, 32);
  }
  </code></pre>