-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
148 lines (135 loc) · 5.03 KB
/
index.html
File metadata and controls
148 lines (135 loc) · 5.03 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<!DOCTYPE html>
<html>
<head>
<title>Programming assignment 1</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="css/stylesheet.css"/>
<script type="text/javascript" src="js/paint.js"></script>
<!--Colorpicker -->
<script src="js/colpick.js" type="text/javascript"></script>
<link rel="stylesheet" href="css/colpick.css" type="text/css"/>
</head>
<body>
<div class="container">
<h1>Programming assignment 1</h1>
<div class="row">
<!-- Choosing tools -->
<div class="col-md-3">
<label for="optradio">Choose your tool:</label>
<div class="radio">
<label title="Pen">
<input type="radio" name="optradio" checked data-tool="pen">
<span class="glyphicon glyphicon-pencil"></span>
</label>
</div>
<div class="radio">
<label title="Pen">
<input type="radio" name="optradio" data-tool="eraser">Eraser
</label>
</div>
<div class="radio">
<label title="Draw Line">
<input type="radio" name="optradio" data-tool="line">Line
</label>
</div>
<div class="radio">
<label title="Draw Circle">
<input type="radio" name="optradio" data-tool="circle">Circle
</label>
</div>
<div class="radio">
<label title="Draw Rectangle">
<input type="radio" name="optradio" data-tool="rect">Rectangle
</label>
</div>
<div class="radio">
<label>
<input id="select_font" type="radio" name="optradio" data-tool="text">
<span class="glyphicon glyphicon-font"></span>
</label>
</div>
<div class="radio">
<label title="Move shape">
<input type="radio" name="optradio" data-tool="move">Move shape
</label>
</div>
</div>
<!-- Color picker and line witdth -->
<div class="col-md-3">
<form class="form">
<div class="form-group">
<label for="colorpicker">Pick Color: </label>
<button id="colorpicker" type="button" class="btn btn-default"></button>
</div>
<div class="form-group">
<label for="strokesize">Line width: </label>
<input id="strokesize" class="form-control" type="range" name="points" min="1" max="30" value="1">
</div>
</form>
<label for line-preview>Line width preview: </label>
<canvas id="line-preview" width="200px" height="40px"></canvas>
</div>
</div>
<br/>
<!-- Tools for text, font style, font size ect. -->
<div class="row text_tools">
<div class="col-md-8">
<form class="form-inline">
<div class="form-group">
<label for="font_family" title="Choose font family">Font: </label>
<select id="font_family" class="form-control">
<option value="Times-New-Roman">Times New Roman</option>
<option value="Arial">Arial</option>
<option value="Comic-Sans-MS">Comic Sans MS</option>
<option value="Calibri">Calibri</option>
<option value="Bedrock">Bedrock</option>
</select>
<button id="bold_font" title="Bold font" type="button" class="btn btn-default" data-toggle="button" aria-pressed="false" autocomplete="off"><span class="glyphicon glyphicon-bold"></span></button>
<button id="italic_font" title="Italic font" type="button" class="btn btn-default" data-toggle="button" aria-pressed="false" autocomplete="off"><span class="glyphicon glyphicon-italic"></span></button>
</div>
<div class="form-group">
<label for="font_size" title="Choose font size">Font size: <span class="glyphicon glyphicon-text-width"></span></label>
<input id="font_size" class="form-control" type="number" value="30"></input>
</div>
</form>
</div>
</div>
<!-- Undo and redo buttons -->
<div class="row ">
<div class="col-md-8 col-md-offset-8">
<div class="form-group">
<button id="undo" type="button" class="btn btn-default">Undo</button>
<button id="redo" type="button" class="btn btn-default">Redo</button>
<button id="clearCanvas" type="button" class="btn btn-warning">
<span class="glyphicon glyphicon-trash"></span> Clear image
</button>
</div>
</div>
</div>
<!-- Canvas / image-area -->
<canvas id="imageView" width="900px" height="400px"></canvas>
<div id="text-spawner"></div>
<!-- Save and delete button -->
<div class="row ">
<div class="col-md-8">
<button id="save_img" type="button" class="btn btn-success">
<span class="glyphicon glyphicon-floppy-disk"></span> Save image
</button>
<button id="load-img" type="button" class="btn btn-success">
<span class="glyphicon glyphicon-floppy-disk"></span> Load image
</button>
</div>
</div>
<br/>
<!-- Contact info -->
<footer>
<a href="mailto:#">[email protected]</a>
</footer>
</div>
</body>
</html>