-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
73 lines (71 loc) · 2.41 KB
/
index.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="./style.css" />
<title>Draw Canvas CG</title>
</head>
<body>
<div class="formClass">
<form name="form1">
<!-- ddaAlgorithm -->
<div class="btn">
<input type="button" value="Undo" onclick="undoData()" />
</div>
<span>DDA Algorithm</span>
<div class="ddainput">
<div class="input-box">
<input type="text" name="x1" placeholder="Enter x1" />
</div>
<div class="input-box">
<input type="text" name="y1" placeholder="Enter y1" />
</div>
<div class="input-box">
<input type="text" name="x2" placeholder="Enter x2" />
</div>
<div class="input-box">
<input type="text" name="y2" placeholder="Enter y2" />
</div>
</div>
<div class="btn">
<input type="button" value="Confirm" onclick="dda()" />
</div>
<div class="btn">
<input type="button" value="Reset" onclick="clearCanvas()" />
</div>
<!-- midPointAlgorithm -->
<span>MidPoint Algorithm</span>
<div class="ddainput">
<div class="input-box">
<input type="text" name="xc" placeholder="Enter x" />
</div>
<div class="input-box">
<input type="text" name="yc" placeholder="Enter y" />
</div>
<div class="input-box-radius">
<input type="text" name="rc" placeholder="Enter radius" />
</div>
<div class="selectColor">
<select class="select" name="color" id="">
<option disabled selected>Select color :</option>
<option value="red">Red</option>
<option value="green">Green</option>
<option value="blue">Blue</option>
</select>
</div>
</div>
<div class="btn">
<input type="button" value="Confirm" onclick="midPoint()" />
</div>
<div class="btn">
<input type="button" value="Reset" onclick="clearCanvas()" />
</div>
</form>
</div>
<canvas id="myCanvas" width="1670" height="1080"></canvas>
<script src="./draw.js">
</script>
</body>
</html>