layout/reftests/canvas/784573-1.html

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

michael@0 1 <!DOCTYPE html>
michael@0 2 <!--
michael@0 3 Any copyright is dedicated to the Public Domain.
michael@0 4 http://creativecommons.org/licenses/publicdomain/
michael@0 5
michael@0 6 This tests that paths are stored in device space. This means that changing
michael@0 7 the transform does not move the points already drawn.
michael@0 8 -->
michael@0 9 <html>
michael@0 10 <head>
michael@0 11 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
michael@0 12 </head>
michael@0 13 <body>
michael@0 14 <p><canvas width="100" height="100" id="c"></canvas></p>
michael@0 15 <script type="text/javascript">
michael@0 16 var c = document.getElementById('c').getContext('2d');
michael@0 17
michael@0 18 c.shadowColor = '#f00';
michael@0 19 c.shadowBlur = 4;
michael@0 20 c.lineWidth = 2;
michael@0 21
michael@0 22 c.translate(50, 40);
michael@0 23
michael@0 24 var d = 30;
michael@0 25 c.beginPath();
michael@0 26 c.moveTo(d, 0);
michael@0 27 for (var n = 0; n < 3; n++) {
michael@0 28 c.rotate(3.14159 / 2);
michael@0 29 c.lineTo(d, 0);
michael@0 30 }
michael@0 31 c.closePath();
michael@0 32 c.stroke();
michael@0 33
michael@0 34 </script>
michael@0 35 </body>
michael@0 36 </html>

mercurial