-
Notifications
You must be signed in to change notification settings - Fork 65
/
index.html
124 lines (119 loc) · 5.63 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
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
<!DOCTYPE html>
<html>
<head>
<title>Vector Ruler SVG Generator</title>
<meta charset="UTF-8">
<meta name="description" content="A web-based applet for the generation of downloadable vector rulers, suitable for laser etching">
<meta name="keywords" content="Ilustrator,Vector,Vector Ruler, SVG, SVG ruler, Javascript SVG">
<meta name="author" content="Robb Godshaw">
<link rel="stylesheet" type="text/css" href="style.css">
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js'></script>
<script type="text/javascript" src="paper-full.js"></script>
<script type="text/javascript" src="rulerGenerator.js"></script>
</head>
<body>
<div class="bootstrap-frm">
<div class="ribbon">
<a href="https://github.com/robbbb/VectorRuler"><svg height="32" aria-hidden="true" viewBox="0 0 24 24" version="1.1" width="32" data-view-component="true" class="octicon octicon-mark-github v-align-middle color-fg-default" style="text-align: right;">
<path d="M12.5.75C6.146.75 1 5.896 1 12.25c0 5.089 3.292 9.387 7.863 10.91.575.101.79-.244.79-.546 0-.273-.014-1.178-.014-2.142-2.889.532-3.636-.704-3.866-1.35-.13-.331-.69-1.352-1.18-1.625-.402-.216-.977-.748-.014-.762.906-.014 1.553.834 1.769 1.179 1.035 1.74 2.688 1.25 3.349.948.1-.747.402-1.25.733-1.538-2.559-.287-5.232-1.279-5.232-5.678 0-1.25.445-2.285 1.178-3.09-.115-.288-.517-1.467.115-3.048 0 0 .963-.302 3.163 1.179.92-.259 1.897-.388 2.875-.388.977 0 1.955.13 2.875.388 2.2-1.495 3.162-1.179 3.162-1.179.633 1.581.23 2.76.115 3.048.733.805 1.179 1.825 1.179 3.09 0 4.413-2.688 5.39-5.247 5.678.417.36.776 1.05.776 2.128 0 1.538-.014 2.774-.014 3.162 0 .302.216.662.79.547C20.709 21.637 24 17.324 24 12.25 24 5.896 18.854.75 12.5.75Z"></path>
</svg><br/><span>Fork me on GitHub</span></a>
</div>
<div class="bootstrap-padded">
<h1>Vector Ruler Generator
<span>Download a laser cuttable ruler to etch into your belongings and belts.</span>
</h1>
<form id="rulerParameters" action="" >
<label>
<span>Output dpi:</span>
<Input type = "radio" name="dpi" id="dpi72" value="72ppx" checked>
72ppx
<Input type = "radio" name="dpi" id="dpi96" value="96ppx" />
96ppx
</label>
<br />
<label>
<span>Start:</span>
<input type="text" id="startNo" value="0" >
</label>
<label>
<span>End:</span>
<input type="text" id="endNo" value="10">
</label>
<!-- <label>
<span>Width:</span>
<input type="text" id="rulerWidth" value="12" >
</label> -->
<label>
<span id="heightTitle">Height (in.):</span>
<input type="text" id="rulerHeight" value="2">
</label>
<label>
<span>Units:</span>
</label>
<Input type = "radio" name="rulerUnits" id="rulerUnitsInches" value="inches" checked>
Inches
<Input type = "radio" name="rulerUnits" id="rulerUnitsCentimeters" value="centimeters" >
Centimeters
<br>
<Input type = "radio" name= "subUnits" id="subUnitsFractional" value = "2" checked>
Fractional
<Input type = "radio" name= "subUnits" id="subUnitsDecimal" value = "10">
Decimal
<label>
<span>Subdivisions: </span>
<select id="subUnitExponent" style="width:30%" >
<option value ="0">Zero</option>
<option value ="1">One</option>
<option value ="2">Two</option>
<option value ="3"
selected >Three</option>
<option value ="4">Four</option>
<option value ="5">Five</option>
<option value ="6">Six </option>
</select>
</label>
<label>
<span>Smaller tick length:</span>
<select id="levelToLevelMultiplier" style="width:30%" >
<option value ="0.1">0.1</option>
<option value ="0.2">0.2</option>
<option value ="0.3">0.3</option>
<option value ="0.4">0.4</option>
<option value ="0.5"
selected >0.5 - Default</option>
<option value ="0.6">0.6</option>
<option value ="0.7">0.7</option>
<option value ="0.8">0.8 </option>
<option value ="0.9">0.9 </option>
<option value ="1">1.0 - All ticks same size </option>
</select>
</label>
<br />
<label>
<span>Font Size (px):</span>
<input id="fontSize" type="text" name="fontSize" value="12" style="width: 20px;">
</label>
<label>
<span></span>
</label>
<span>
<input type="checkbox" name="absoluteValues" id="absoluteValues" >Absolute Values
<input type="checkbox" name="redundant" id="redundant" >Draw redundant lines<br>
</span>
</form>
<form id="svgexpform" method="post" action="http://download-data-uri.appspot.com/" >
<b>Filename: </b>
<input type="text" name="filename" value="exportedRuler.svg">
<input id="svgexpdata" name="data" value="123" type="hidden">
<a href="#" id="downloadSVG">
<input type="button" class="button" value="Download ruler as .SVG" id="svgexpbutton">
</a>
</form>
<hr>
</div>
<div style="overflow-x:scroll;">
<canvas id="paintCanvas" resize></canvas>
</div>
</div>
</body>
</html>