-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathexample.html
33 lines (33 loc) · 1.52 KB
/
example.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!DOCTYPE html>
<html>
<head>
<title>Example using jPolygon</title>
<meta charset="UTF-8">
<meta name="description" content="An example using jPolygon">
<meta name="keywords" content="HTML,CSS,JavaScript,jPolygon">
<meta name="author" content="Matteo Mattei">
</head>
<body onload="clear_canvas()">
<div style="float:left">
<canvas id="jPolygon" width="640" height="480" style="cursor:crosshair" data-imgsrc="image.jpg" onmousedown="point_it(event)" oncontextmenu="return false;">
Your browser does not support the HTML5 canvas tag.
</canvas>
</div>
<div style="float:left; margin-left:20px;">
<div>
<button onclick="undo()">Undo</button>
<button onclick="clear_canvas()">Clear</button>
<p>Press <strong>Left Click</strong> to draw a point.</p>
<p><strong>CTRL+Click</strong> or <strong>Right Click</strong> to close the polygon.</p>
</div>
<div>
<p><strong>Coordinates:</strong></p>
<textarea id="coordinates" disabled="disabled" style="width:300px; height:200px;"></textarea>
</div>
<div>
<p>Go to <a href="http://www.matteomattei.com/projects/jpolygon">project website</a> - <a href="https://github.com/matteomattei/jPolygon">source code</a></p>
</div>
</div>
<script type="text/javascript" src="jPolygon.js"></script>
</body>
</html>