Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
<body>
  <canvas width="300" height="300" id="skewTest"></canvas>
  <script>
    function init() {
    var canvas = document.getElementById('skewTest'),
        context = canvas.getContext('2d'),
        angle = Math.PI / 23;
    img = document.createElement('img');
    img.src = 'http://cdn.designinstruct.com/files/71-apple_imac_design/step1_guassian_blur.jpg';
    img.onload = function () {
        context.setTransform(1, Math.tan(angle), 0, 1, 0, 0);
        context.clearRect(0, 0, 200, 200);
        context.drawImage(img, 0, 0, 100, 100);
    }
    }
    init();
  </script>
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers