61 lines
1.2 KiB
HTML
61 lines
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>canvas读取图片</title>
|
|
<script src="../dep/esl.js"></script>
|
|
<script src="../dep/jquery.min.js"></script>
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
#points, #points-break {
|
|
position: absolute;
|
|
left: 0;
|
|
top: 0;
|
|
width: 800px;
|
|
height: 800px;
|
|
}
|
|
|
|
#points i,
|
|
#points-break i {
|
|
position: absolute;
|
|
width: 1px;
|
|
height: 1px;
|
|
background: #ddd;
|
|
}
|
|
|
|
#points-break i.break {
|
|
width: 2px;
|
|
height: 2px;
|
|
background: red;
|
|
}
|
|
|
|
#points-break i.mark {
|
|
width: 1px;
|
|
height: 1px;
|
|
background: green;
|
|
}
|
|
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="points" width="800" height="800"></div>
|
|
<canvas id="canvas" width="800" height="800"></canvas>
|
|
<div id="points-break"></div>
|
|
<script>
|
|
require.config({
|
|
baseUrl: '../src',
|
|
paths: {
|
|
demo: '../demo/js',
|
|
}
|
|
});
|
|
define('jquery', $);
|
|
</script>
|
|
|
|
<script>require(['demo/fitContours'])</script>
|
|
</body>
|
|
</html>
|