Commit 0faaffce authored by Romain Lesur's avatar Romain Lesur

add canvas example

parent 8f6c52db
Pipeline #82 failed with stage
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>A simple canvas element</title>
<script type="text/javascript" src="https://unpkg.com/pagedjs/dist/paged.polyfill.js"></script>
<style type="text/css">
@page{
size: A4;
margin-left: 15mm;
margin-right: 15mm;
margin-bottom: 15mm;
margin-top: 15mm;
}
.pagedjs_margin-top-left, .pagedjs_margin-top-right { height: 6px; margin-top: 10mm; }
.pagedjs_margin-top { align-items: top; }
@media screen {
body {
background-color: whitesmoke;
}
.pagedjs_page {
background-color: white;
box-shadow: 0 0 0 2px #888;
margin: 0 auto;
margin-top: 10mm;
}
}
#test {
border:1px solid black;
}
</style>
</head>
<body>
<h1>A simple canvas element</h1>
<canvas id="test" width="100" height="100"> </canvas>
<script type="text/javascript">
var el = document.getElementById("test");
var context = el.getContext("2d");
context.beginPath();
context.arc(50,50,40,0,2*Math.PI);
context.stroke();
</script>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment