mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Added canvas image test
This commit is contained in:
parent
501f559783
commit
ab5055ffad
@ -10,6 +10,14 @@
|
||||
<script type="text/javascript" src="../build/jquery.plugin.html2canvas.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(window).ready(function() {
|
||||
var ctx = $('#testcanvas')[0].getContext('2d');
|
||||
|
||||
ctx.fillStyle = "rgb(200,0,0)";
|
||||
ctx.fillRect (10, 10, 55, 50);
|
||||
|
||||
ctx.fillStyle = "rgba(0, 0, 200, 0.5)";
|
||||
ctx.fillRect (30, 30, 55, 50);
|
||||
|
||||
$('body').html2canvas();
|
||||
});
|
||||
</script>
|
||||
@ -35,23 +43,26 @@
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<img src="image.jpg" />
|
||||
<img src="image.jpg" style="width:50px;height:400px;" />
|
||||
<img src="image.jpg" style="width:500px;" />
|
||||
<img src="image.jpg" style="width:500px;height:40px;" />
|
||||
|
||||
|
||||
<img src="image.jpg" style="padding:20px;border:5px solid black;" />
|
||||
|
||||
<img src="image.jpg" style="padding-bottom:20px;border-top:5px solid black;clear:both;" />
|
||||
|
||||
|
||||
<img src="image.jpg" style="padding-top:20px;border-top:5px solid black;clear:both;width:50px;" />
|
||||
<img src="image.jpg" style="padding-top:20px;border-top:5px solid black;clear:both;width:50px;height:25px;" />
|
||||
|
||||
<img src="image.jpg" style="width:0px;height:0px;border:1px solid black" />
|
||||
<img src="image.jpg" style="width:0px;height:0px;" />
|
||||
|
||||
<img src="image.jpg" />
|
||||
<img src="image.jpg" style="width:50px;height:400px;" />
|
||||
<img src="image.jpg" style="width:500px;" />
|
||||
<img src="image.jpg" style="width:500px;height:40px;" />
|
||||
|
||||
|
||||
<img src="image.jpg" style="padding:20px;border:5px solid black;" />
|
||||
|
||||
<img src="image.jpg" style="padding-bottom:20px;border-top:5px solid black;clear:both;" />
|
||||
|
||||
|
||||
<img src="image.jpg" style="padding-top:20px;border-top:5px solid black;clear:both;width:50px;" />
|
||||
<img src="image.jpg" style="padding-top:20px;border-top:5px solid black;clear:both;width:50px;height:25px;" />
|
||||
|
||||
<img src="image.jpg" style="width:0px;height:0px;border:1px solid black" />
|
||||
<img src="image.jpg" style="width:0px;height:0px;" />
|
||||
|
||||
<canvas id="testcanvas" style="width:100px;height:100px;"></canvas>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user