Mercurial > defr > drupal > scald > dnd
annotate js/bt/other_libs/excanvas_0002/testcases/overflow.html @ 18:0d557e6e73f7
Added beautytips and some additional event handling code to the library.
author | David Eads <eads@chicagotech.org> |
---|---|
date | Fri, 06 Mar 2009 14:11:46 -0600 |
parents | |
children |
rev | line source |
---|---|
eads@18 | 1 <!DOCTYPE html> |
eads@18 | 2 <html> |
eads@18 | 3 <head> |
eads@18 | 4 <title>Overflow Test</title> |
eads@18 | 5 <style> |
eads@18 | 6 |
eads@18 | 7 body { |
eads@18 | 8 text-align: center |
eads@18 | 9 } |
eads@18 | 10 |
eads@18 | 11 </style> |
eads@18 | 12 <!--[if IE]><script type="text/javascript" src="../excanvas.js"></script><![endif]--> |
eads@18 | 13 <script> |
eads@18 | 14 |
eads@18 | 15 window.onload = function() { |
eads@18 | 16 var ctx = document.getElementById('c').getContext('2d'); |
eads@18 | 17 |
eads@18 | 18 ctx.fillStyle = 'blue'; |
eads@18 | 19 ctx.fillRect(-50, -50, 100, 100); |
eads@18 | 20 |
eads@18 | 21 ctx.fillStyle = 'green'; |
eads@18 | 22 ctx.fillRect(50, 50, 100, 100); |
eads@18 | 23 |
eads@18 | 24 ctx.strokeStyle = 'black'; |
eads@18 | 25 ctx.strokeRect(0, 0, 100, 100); |
eads@18 | 26 }; |
eads@18 | 27 |
eads@18 | 28 </script> |
eads@18 | 29 </head> |
eads@18 | 30 <body> |
eads@18 | 31 |
eads@18 | 32 <canvas id=c width=100 height=100></canvas> |
eads@18 | 33 |
eads@18 | 34 <p>This tests if content gets cropped if painting outside the canvas.</p> |
eads@18 | 35 |
eads@18 | 36 </body> |
eads@18 | 37 </html> |