title: How to affect the different directions in canvas?
body: <p>I got an image in canvas. I need to scale my image to the top, to the bottom, to the left and to the right differently.</p>
  
  <p>Function <code>drawImage</code> has only width and height parameters, but not top, bottom, right and left.</p>
  
  <pre><code>drawImage(img, 0, 0, c.width, c.height)
  </code></pre>
  
  <p>How can I do this?</p>
  
  <p><a href="http://codepen.io/Alexnotonfire/pen/GpdLOx" rel="nofollow">Codepen</a> sandbox</p>