-
Notifications
You must be signed in to change notification settings - Fork 0
/
indexPat.html
192 lines (138 loc) · 6.86 KB
/
indexPat.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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Pattern writer - Early writing</title>
<meta name="description" content="Easy Pattern Writer - HTML5 canvas based writer.">
<meta name="viewport" id='btnClick' content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="stylesheet" href="css/easywriteold.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.4/jspdf.min.js"></script>
<script>src="js/math.js"</script>
<style>
#videoC {
position: relative;
top: 0;
left: 0;
width: 10%;
height: 10%;
}
#signature-pad {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: transparent;
}
</style>
</head>
<body onselectstart="return false" style = "margin: 0;padding: 0;" >
<div id="signature-pad" class="signature-pad">
<div id="signature-pad" class="signature-pad--body" >
<canvas id="myCanvas" width=100% height=100% style= "position: absolute;top: 0; overflow: hidden; border:1px solid #fff; background-color: transparent;margin: 0;padding: 0; ">
Your browser does not support the HTML5 canvas tag.</canvas>
<script>
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d"); //the draw/write area
</script>
</div>
<div class="display-pad" id="display-pad" style = "position = relative; overflow = auto;
background: #fff;">
<canvas class = "containB" id="mydisplay" width= 100% style = "overflow = auto; background-color: transparent;margin: 0;padding: 0;">
Your browser does not support the HTML5 canvas tag.</canvas>
<script>
var c2 = document.getElementById("mydisplay");
var scroll = c2.scrollTop;
c2.width = window.innerWidth;
c2.height = window.innerHeight*6;
var ctx2 = c2.getContext("2d");
</script>
</div>
</div>
</div>
<div id = "hide3" style = "height: 1%;
background-color: #fff;
position: absolute;
top: 0;
width: 98%;
text-align: right;">
<button id = "button1" onclick="copyme()" style = "display:inline-block; width: 31vw; margin: 0;padding: 0; font-face: 'Comic Sans MS'; font-size: larger; color: white; background-color: #0A0;">Copy</button>
<button id = "button2" onclick="hide()" style = "display:inline-block; width: 31vw; margin: 0;padding: 0;font-face: 'Comic Sans MS'; font-size: larger; color: white; background-color: #00A;" >Colours-Save PDF</button>
<button id = "button3" onclick="hide2()" style = "display:inline-block; width: 31vw; margin: 0;padding: 0;font-face: 'Comic Sans MS'; font-size: larger; color: white; background-color: #A00;" >Help</button><br><br>.....
<img id = "animated-image" height = "60vh" src = "waves/frame000.png"></img><br><br>
<audio id = "sound" controls style = "filter: sepia(100%) saturate(790%) grayscale(1%) contrast(90%) drop-shadow(8px 8px 5px orange);
width: 150px;
height: 25px;">
<source src="sounds/waves.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
<div id="instructions">
<div id = "hide" style = "width: 20px;
background-color: #fff;
position: absolute;
left: 0;
height: 100%;
display: none;
margin: 0;
padding: 0;">
<textarea id='text' text-size-adjust=none display=none style = "display:inline-block;"></textarea>
<canvas id='textCanvas' height=20 style = "display:inline-block;"></canvas>
<img src="images/S/Delete.png" onclick = "clearme()" data-action = "clear" ></img>
<img id = "colorPen" src="images/S/blackPen.png" ></img>
<img src="images/S/Red.png" onclick = "colorR()" ></img>
<img src="images/S/Orange.png" onclick = "colorO()" ></img>
<img src="images/S/Yellow.png" onclick = "colorY()" ></img>
<img src="images/S/Green.png" onclick = "colorG()" ></img>
<img src="images/S/Blue.png" onclick = "colorBl()" ></img>
<img src="images/S/Purple.png" onclick = "colorP()" ></img>
<img src="images/S/Black.png" onclick = "colorB()" ></img>
<img src="images/S/centre.png" onclick = "centre()" ></img>
<img src="images/S/Keep.png" onclick = "copyme()" data-action = "keep" ></img>
<img src="images/S/newline.png" onclick = "mynewline()" ></img>
<img src="images/S/Save.png" onclick = "savePDF()"></img>
<script>
const canvastc = document.getElementById("textCanvas");
canvastc.style.font = canvastc.getContext("2d").font;
console.log(canvastc.style.font);
canvastc.style.fontSize = "24px arial";
console.log(canvastc.style.font);
//canvastc.getContext("2d").font = canvastc.style.font;
const ctxtc = canvastc.getContext("2d");
var cFont = ctxtc.font;
var fontArgs = ctxtc.font.split(' ');
var newSize = '24px';
ctxtc.font = newSize + ' ' + fontArgs[fontArgs.length - 1]; /// using the last part
document.getElementById("text").value = ' ';
</script>
</div>
<div id = "hide2" style = "background-color: #fff;
position: absolute;
top: 0;
text-align: center;
width: 70%;
display: none;
margin: 20;
padding: 20;"><br>
<H1 >
Click on the HELP button to hide this message.<br>
Click on the COPY button to copy your writing to the PDF.<br>
Click on the COLOURS - SAVE PDF button to show or hide additional icons.<br><br>
Easy-peasy writing tool if you struggle with small writing. <br>
You write large in the blue area below and click on COPY to move the writing to the top pdf page. <br>
Use for class, mathematics or any other purpose. Write on your phone or tablet, then press the white check mark or Copy Button to transcribe to the pdf area. <br>
You can also type in the text box and submit the text using the same white check icon or the COPY button. <br> <br>
Use the red PDF icon to download the document in PDF to your computer.<br>
The White X icon deletes the current writing without transferring it to the PDF side.<br>
The Colour icons pick a pen colour.<br>
The C-target icon places the current writing on a new line on the centre of the PDF<br>
The NEW icon moves to a new line in the PDF.<br>
<br>
Click on the HELP button to hide this message.
</H1></div>
<script src="js/signature_pad.js"></script>
<script src="js/appPat.js"></script>
<script src="https://vjs.zencdn.net/8.0.4/video.min.js"></script>
</body>
</html>