-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdesenho.html
1389 lines (1326 loc) · 64 KB
/
desenho.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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<meta name="mobile-web-app-capable" content="yes" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<link rel="stylesheet" type="text/css" href="css/desenho.css" />
<link rel="stylesheet" type="text/css" href="css/index.css" />
<link rel="stylesheet" type="text/css" href="css/icons.css" />
<link rel="stylesheet" type="text/css" href="css/game.css" />
<title>Yoga Art 9</title>
</head>
<body class="naotoque" style="cursor: pointer">
<div id="canvas_window" class="hideScroll" style="top: 120px; left: 0px">
<div id="canvas_div2">
<div id="canvas_div">
<canvas id="canvasB" width="320px" height="320px" oncontextmenu="return false;"
style="position: absolute; z-index: -3;">
Sinto muito, talvez haja uma incompatibilidade com seu navegador ou
está offline e algo não carregou como deveria... this is for displaying back layers<br />
</canvas>
<canvas id="canvas" width="320px" height="320px" oncontextmenu="return false;">
Sinto muito, talvez haja uma incompatibilidade com seu navegador ou
está offline e algo não carregou como deveria...<br />
</canvas>
</div>
</div>
</div>
<div id="tela" style="overflow-y: hidden" class="naotoque">
<div id="desenho_div" style="overflow-y: hidden" class="naotoque">
<div id="ferramentas" class="ferramentas">
<span id="yoga" onmousedown="yoga()" class="mais"><span class="icon2 yogaicon"></span></span>
<span id="help" title="help" class="mais selected" onmousedown="modeTo('help')">
<span class="icon2 helpicon"></span></span>
<span id="salvar" title="salvar imagem" class="mais" onclick="mostraMenu('salvar')">
<span class="icon2 saveicon"></span></span>
<span id="imagem" title="adicionar imagem" class="mais" onmousedown="mostraMenu('imagem')">
<span class="icon2 foldericon"></span>
</span>
<span id="canvasmenu" title="Propriedades do desenho" class="mais" onclick="mostraMenu('quadro')">
<span class="icon2 frameicon"></span>
</span>
<span id="undo" title="desfazer" class="mais" onmousedown="undoT()" onmouseup="undoTEnd()"
onmouseleave="undoTEnd()"><span class="icon2 undoicon"></span></span>
<span id="redo" title="refazer" class="mais" onmousedown="redoT()" onmouseup="redoTEnd()"
onmouseleave="redoTEnd()"><span class="icon2 redoicon"></span></span>
</div>
<div id="ferramentas3" class="ferramentas">
<span id="night" class="mais" onmousedown="night()" title="modo escuro / claro">
<span class="icon2 nighticon"></span>
</span>
<span id="cam" title="foto" class="mais" onmousedown="modeTo('cam')"><span
class="icon2 cameraicon"></span></span>
<span id="FX" title="filtros" class="mais" onclick="modeTo('FX')"><span class="icon2 fxicon"></span>
</span>
<span id="rotacionar" onmousedown="modeTo('rotacionar')" class="mais" alt="rotacionar o quado">
<span class="icon2 rotateicon"></span></span>
<span id="move" onmousedown="modeTo('move')" class="mais" alt="mover o quadro">
<span class="icon2 moveicon"></span>
</span>
<span id="recortar" class="mais" onclick="modeTo('recortar')"><span class="icon2 cropicon"></span></span>
<span id="redimensionar" class="mais" onclick="modeTo('redimensionar')"><span class="icon2 scaleicon"></span>
</span>
</div>
<div id="ferramentas2" class="ferramentas">
<span id="pintar" title="pintar" class="mais selected" onmousedown="modeTo('pintar')">
<span class="icon pintaricon"></span>
</span>
<span onmousedown="backPaint()" class="mais" id="globalComposite">
<span class="icon2 paintovericon"></span>
</span>
<span id="apagar" title="Apagar" class="mais" onmousedown="modeTo('apagar')"><span
class="icon eraseicon"></span></span>
<span id="cores" title="cores" class="mais" onmousedown="mostraMenu('cores')"><span
class="icon coresicon"></span></span>
<span id="selecionar" title="selecionar" onmousedown="modeTo('selecionar')" class="mais"
alt="ferramenta de seleção">
<span class="icon clipboardicon">
<span class="icon selecticon"></span></span>
</span>
<span id="zoomx" title="Ampliar" class="mais" onmousedown="modeTo('zoomx')"><span class="icon zoomicon"></span>
<span id="x1" style="
font-size: 0.6em;
display: block;
position: absolute;
width: 36px;
height: 20px;
font-weight: 700;
text-align: center;
color: #fff;
">1x
</span>
</span>
<span id="texto" class="mais" title="texto" class="mais" onclick="modeTo('texto')">
<span class="icon textoicon"></span>
</span>
</div>
<div id="anime" class="ferramentas"></div>
<div id="ui_filme"></div>
</div>
<div id="menus">
<div id="menutexto" class="submenu fundobranco">
<span class="close" title="fechar" onmousedown="removeClass()"></span>
<span class="mais" onclick="toggleTextBrush()" style="float: left"><span class="icon textoicon"
style="margin-left: -4px"><span class="iconsmall pintaricon" id="textBrush"
style="margin-left: 12px"></span></span></span>
<input type="text" id="textInput" style="width: 180px; margin-top: 11px; margin-bottom: 10px"
class="one" /><button class="first-btn">😋</button>
<button onclick="toggleDropdown()" class="mais .dropbtn">🎉</button>
<div id="greetingsDropdown" class="dropdown-content fundobranco" style="display: block"></div>
<span class="iconsmall lixeiraicon" onclick="clearTextInput()"></span>
<small>Google Fonts:</small>
<select id="fontSelect" style="width: 140px; margin-bottom: 10px">
<!-- Font options will be dynamically added using JavaScript -->
</select>
<br />
<label for="fontSizeInput"><span class="iconsmall fontsizeicon"></span></label>
<input type="number" id="fontSizeInput" min="6" max="200" value="16" style="width: 50px" />
<span onmousedown="changeFontUp()" class="icon plusicon right"></span>
<span onmousedown="changeFontDown()" class="icon minusicon right"></span>
<div class="custom-dropdown">
<div class="dropdown-header">
<span class="mais icon fonticon" style="margin-left: 5px; margin-top: -23px"></span><br />
</div>
<div id="dropdown-options" class="dropdown-options esconde">
<!-- Options will be dynamically added here -->
</div>
</div>
<span id="boldButton" class="mais icon boldicon" style="margin-right: 8px; margin-left: 52px"></span>
<span id="italicButton" class="mais icon italicicon" style="margin-left: 4px"></span>
<br />
<label for="colorSelect"><span class="iconsmall coresicon"></span></label>
<select id="colorSelect">
<option id="fontStrokeColor" style="display: block; color: #fff" value="#ff005544">
A
</option>
<option id="fontEstrokeColor" style="display: block; color: #fff" value="#ff005544">
B
</option>
<option value="black" style="display: block; background-color: #000; color: #fff">
Black
</option>
<option value="white">White</option>
</select>
<!--button id="drawButton">Draw</button-->
</div>
<div id="menumandala" class="submenu fundobranco">
<span class="close" title="fechar" onmousedown="removeClass()"></span>
<span class="icon mandalaicon"></span>
<txt name="94">Fatias da mandala</txt><br />
<input id="mandalabar" type="number" min="2" max="32" value="24" step="1" style="width: 160px"
onchange="mandalaSlices(this.value)" /><br />
</div>
<div id="menuAB" class="submenu fundobranco">
<span class="close" title="fechar" onmousedown="removeClass()"></span>
A to B gradient brush
<!--txt name="94">Fatias da mandala</txt><br-->
<input id="abdistance" type="range" min="1" max="95" value="20" step="1" style="width: 160px"
onchange="abDistanceChange(this.value)" /><br />
<span id="abbar" style="
display: inline-block;
height: 20px;
width: 100px;
border-radius: 10px;
"></span>
</div>
<div id="menupicker" class="submenu fundobranco">
<span class="close" title="fechar menu tamanho da tela" onmousedown="removeClass()"></span>
<span class="icon pickericon"></span>
<txt name="1">Toque numa área pintada<br />
para capturar uma cor</txt>
</div>
<div id="menumove" class="submenu fundobranco">
<span class="close" title="fechar" onmousedown="removeClass()"></span>
<img src="img/movearrow.png" style="width: 28px; height: 28px; margin-top: 4px" />
<txt name="77"> mover o quadro</txt>
</div>
<div id="menuinfo" class="submenu fundobranco">
<span class="fundobranco">
<span class="close" onmousedown="removeClass()"> </span>
<span style="
display: block;
position: relative;
float: left;
font-size: 32px;
margin-right: 4px;
" onmousedown="toggleConsole()">
<span class="icon infoicon"></span></span>
<span class="iconsmall alerticon"></span>
<txt name="3"><b>Atenção!</b></txt><br />
<txt name="4">
Este é um App de diversão! <br />
durante o processo de criação e exportação, a imagem perderá
qualidade!<br />
Dito isto, espero que você se divirta!<br /></txt>
</span>
<span class="fundobranco">
<txt name="5">Feito por:</txt>
<a href="https://diegoferraribruno.github.io/">Diego Ferrari Bruno</a>
<txt name="6"> com códigos de:</txt>
<a href="https://leimao.github.io/blog/HTML-Canvas-Mouse-Touch-Drawing/" target="_blank">
Lei Mao</a>,
<a href="https://github.com/doug2k1/javascript-camera">
Douglas Matoso</a>,
<a href="http://tricedesigns.com/sketching-with-html5-canvas-and-brush-images/" target="blank">Andrew
Trice</a>
<txt name="7">e uma turma aí do</txt>
<a href="http://stackoverflow.com" target="_blank">
stackOverflow!</a>🥰
<h3>
<txt name="8">Mudanças nas versões:</txt>
</h3>
<div id="versoes"></div>
</span>
</div>
<div id="menutamanho" class="fundobranco submenu">
<span class="botao">
<span class="close" title="fechar menu tamanho da tela" onmousedown="removeClass()"></span>
<txt name="19">Tamanho do quadro</txt>
<!--txt name="9">Tamanho atual:</txt><br>
<txt name="10">Largura: </txt><input id="largura" type="number" maxlength="4" max="1920" value="320"
style="width:60px; padding: 4px;" /> px <span title="margem a esquerda">➡️<input id="offsetx"
type="number" maxlength="4" max="1920" value="0" style="width:60px; padding: 4px;"
onchange="precut()" />
</span><br>
<txt name="11">Altura:</txt> <input id="altura" type="number" maxlength="4" max="1920" value="320"
style="width:60px;padding: 4px;" /> px <span title="margem acima">⬇️<input id="offsety"
type="number" maxlength="4" max="1920" value="0" style="width:60px; padding: 4px;"
onchange="precut()" />
</span><br>
<div onmousedown="tamanho()" class="bot"
style="position: absolute; color: white; font-family: Arial, Helvetica, sans-serif; font-size: 1.3em; font-weight: bold; margin-top: -36px; right: 10px; text-align: center;">
ok
</div>
</span-->
<span class="botao" style="
font-size: 0.8em;
display: block;
overflow: scroll;
height: 190px;
width: 220px;
-ms-overflow-style: auto;
scrollbar-width: thin;
margin-bottom: 10px;
border: darkgrey solid 1px;
background-color: #ffffff22;
border-radius: 8px;
margin-right: auto;
margin-left: auto;
margin-top: 4px;
" title="
formatos" id="formatos2">
<span onmousedown=" tamanho3(32,32)" id="32x32">32x32
<span style="
border: 2px solid gray;
width: 4px;
height: 4px;
display: inline-block;
"></span>
</span>
<span onmousedown="tamanho3(64,64)" id="64x64">64x64
<span style="
border: 2px solid gray;
width: 7px;
height: 7px;
display: inline-block;
"></span> </span><br />
<span onmousedown="tamanho3(128,128)" id="128x128">128x128
<span style="
border: 2px solid gray;
width: 12px;
height: 12px;
display: inline-block;
"></span> </span><br />
<span onmousedown="tamanho3(320,320)" id="320x320">320x320
<span style="
border: 2px solid gray;
width: 16px;
height: 16px;
display: inline-block;
"></span> </span><br />
<span onmousedown="tamanho3(640,640)" id="640x640">
SD: 640x640
<span style="
border: 2px solid gray;
width: 20px;
height: 20px;
display: inline-block;
"></span> </span><br />
<span onmousedown="tamanho3(640,360)" id="640x360">
SD: 640x360
<span style="
border: 2px solid gray;
width: 20px;
height: 12px;
display: inline-block;
"></span> </span><br />
<span onmousedown="tamanho3(1280,720)" id="1280x720*">HD: 1280x720
<span style="
border: 2px solid gray;
width: 32px;
height: 18px;
display: inline-block;
"></span> </span><br />
<span onmousedown="tamanho3(1920,1080)" id="1920x1080">FHD: 1920x1080
<span style="
border: 2px solid gray;
width: 40px;
height: 22px;
display: inline-block;
"></span> </span><br />
<span onmousedown="tamanho3(1080,1080)" id="1080x1080">Ig:1080x1080
<span style="
border: 2px solid gray;
width: 22px;
height: 22px;
display: inline-block;
"></span> </span><br />
<span onmousedown="tamanho3(3508,2480)" id="3508x2480">A4 300dpi 3508x2480
<span style="
border: 2px solid gray;
width: 35px;
height: 24px;
display: inline-block;
"></span> </span><br />
<span onmousedown="tamanho3(2480,3508)" id="2480x3508">A4 300dpi 2480x3508
<span style="
border: 2px solid gray;
width: 24px;
height: 35px;
display: inline-block;
"></span>
</span>
</span>
<txt name="10">Largura: </txt><input id="largura2" type="number" maxlength="4" max="1920" value="320"
style="width: 60px; padding: 4px" />
px
<br />
<txt name="11">Altura:</txt>
<input id="altura2" type="number" maxlength="4" max="1920" value="320" style="width: 60px; padding: 4px" />
px
<span onmousedown="tamanho2()" class="mais" style="
float: left;
position: relative;
margin-top: -40px;
margin-left: 260px;
text-align: center;
width: 36px;
height: 36px;
">
<span class="icon2 canvassizeicon"></span>
</span>
</span>
</div>
<!--div id="menuemoji" class="fundobranco submenu menu">
<emoji-picker id="emojipicker" class="fundobranco"></emoji-picker>
<span class="botao"> <span class="bot" onclick="emojipicker()" title="selecione seu emoji">😍</span>
↕️<input type="range" id="emosize" name="strokeSize" min="16" max="320" step="8"
oninput="emojiSizeRange()" value="16" width="200px">
<span title="fechar menu emoji" onmousedown="removeClass()" class="close"></span></span>
<span class="botao ligth" onclick="emojipicker()"
style="display:inline-block; width:320px; max-height: 200px; overflow:hidden; line-height: 200px; vertical-align: middle; background-image: url('img/grid3.png');">
<span id="emoExemplo">😍</span></span>
</div-->
<div id="menupintar" class="fundobranco submenu menu">
<span class="botao" style="display: inline-flex">
<span id="dinamicbrush" class="mais" onclick="toggleDinamicBrush()">
<span class="icon dinamicbrushicon"></span>
</span>
<span id="infinity" class="mais" onclick="infinityPaint()">
<span class="icon infinityicon"></span></span>
<span id="mandala" title="mandala" class="mais" onmousedown="Mandala()"><span
class="icon mandalaicon"></span></span>
<span id="mirror" title="mirror" class="mais" onmousedown="Mirror()"><span
class="icon mirroricon"></span></span>
<span class="mais" onmousedown="mostraSubMenu('custombrush')">
<span class="icon custombrushicon"></span></span>
<!--span id="emoji" title="pintar emoji" class="mais selected" onmousedown="modeTo('emoji')">😍</span-->
<span title="fechar" onmousedown="removeClass()" class="close">
</span>
</span>
<div class="botao" id="pinceis"></div>
<div class="botao" id="pinceis2"></div>
<span class="botao">
<span style="
display: block;
float: right;
margin-right: 8px;
width: 30px;
padding-top: -12px;
font-size: 24px;
" onclick="addFavBrushPin()"><span class="icon pinicon"></span>
</span>
<input type="number" id="tpx" min="1" max="100" step="1" value="1" onchange="setStrokeSize(this.value)"
style="width: 50px; margin-left: 8px" />
<input type="range" id="strokeSize" name="strokeSize" min="0" max="26" step="1"
oninput="strokeSizeRange(this.value)" value="6" width="200px" />
<br />
<span class="iconsmall dinamicbrushicon"></span> max<input type="number" id="tpx2" min="1" max="6" step="0.1"
value="3" onchange="setStrokeMax(this.value)" style="width: 50px; margin-left: 8px" />x
</span>
<span class="botao light" onmousedown="removeClass()" style="background-color: #ffffff22; max-height: 220px">
<img src="" id="brushSize" />
<div style="display: block; height: 160px; width: 320px">
<canvas id="brushCanva" width="40px" height="40px" style="display: none"></canvas>
</div>
<span class="close"></span>
</span>
</div>
<!--div id="menuapagar" class="fundobranco submenu">
<span class="botao" title="fechar menu apagar" onmousedown="removeClass()"><span
class="icon eraseicon"></span>
<txt name="14">Apagador</txt>
<span class="close"></span>
</span><br>
<span style="float: center; position: relative; width: 16px" onmousedown="changeLine()"><span
id="line2">
➕</span></span>
<input type="number" id="tpx2" min="0.5" max="100" step="0.3" value=""
onchange="setStrokeSize(this.value)" style="width: 50px; margin-left: 8px">
<input type="range" id="estrokeSize" name="estrokeSize" min="1" max="16" step="1"
oninput="strokeSizeRange(this.value)" value="16" width="160px">
<span onmousedown="removeClass()" id="mostraCor" style="background-color: 'hsl(0, 100%, 0%);'">
</span>
<div>
💧<input type="range" id="transparenciaE" name="transparencia" min="0.1" max="1"
oninput="mudaCorAlpha()" step="0.1" value="1"></div>
</div-->
<div id="menucores" class="submenu fundobranco">
<span class="botao" style="display: inline-flex">
<span title="Pega cor" id="picker" class="mais" onmousedown="modeTo('picker')">
<span class="icon pickericon"></span></span>
<span id="glow" title="glow" class="mais selected icon2 glowicon" onmousedown="glow()">
</span>
<span id="rainbow" title="rainbow" class="mais selected icon2 rainbowicon" onmousedown="rainbow()"></span>
<span id="rainbowAB" title="rainbow" class="mais" style="color: #fff" onmousedown="rainbow('ab')">a-b</span>
<span title="preencher" id="preencher" onmousedown="mostraMenu('preencher')" class="mais" style="float: left">
<span class="icon2 bucketicon"></span></span>
<span title="fechar" onmousedown="removeClass()" class="close">
</span>
<!--img src="img/dinamicInk.png" style="margin-left: 4px;"><label class="toggle"> <input
type="checkbox" id="dinamicInk" onchange="toggleDinamicInk()"
style="width: 50px; margin-left: 8px">
<span class="knob"></span>
</label--> </span><br />
<div id="paleta" class="fundobranco glow"></div>
<div id="menu" class="fundobranco glow">
<span style="display: block; float: left; height: 120px; width: 40px">
<span onclick="changeType()" class="mais icon2small numbericon"></span>
<span onclick="changeColorMode('rgba')" class="mais icon2small fxicon" style="color: #fff">rgba</span>
<span onclick="changeColorMode('hsla')" class="mais icon2small fxicon" style="color: #fff">hsla</span>
<span onclick="changeColorMode('hex')" class="mais icon2small fxicon" style="color: #fff">hex</span>
</span>
<span id="colorcontrol" class="colormenu"></span>
<span id="salvaCor" onmousedown="salvaCor()" title="Favoritar" class="mais">
<span class="icon pinicon" style="position: absolute; margin-left: 80px; margin-top: -10px">
</span><span style="
position: absolute;
margin-left: -4px;
margin-top: 0px;
font-size: medium;
">A
</span>
</span>
<span class="icon2 swapicon" style="
transform: scale(0.6);
margin: -4px;
color: #fff;
float: right;
" onmousedown="switchEstroke()"></span>
<span id="salvaCor2" onmousedown="switchEstroke()" title=" old stroke" class="mais"
style="float: right; height: 26px; width: 26px; margin-top: 4px"><span style="
margin-left: -5px;
color: #fff;
position: absolute;
font-size: 18px;
">B</span>
</span>
</div>
<div id="paleta2" class="fundobranco glow">
<txt name="15">Use a taxinha para guardar sua cor.</txt>
</div>
<div id="paleta3" class="fundobranco glow"></div>
</div>
<div id="menucustombrush" class="fundobranco submenu naotoque" style="text-align: center; height: auto">
<div class="botao">
<span title="fechar" onmousedown="mostraSubMenu('custombrush')" class="close"></span>
<span id="criaCustom" class="icon2 frameicon" onmousedown="criaCustom()"></span>
<span class="bot" onmousedown="criaCustom()"><span class="icon custombrushicon"></span>
</span>
<txt name="17" onmousedown="criaCustom()">quadro como pincel</txt>
</div>
<div class="botao" id="criaCustom2" onmousedown="criaCustom(true)">
<span class="icon clipboardicon"></span><span class="bot"><span class="icon custombrushicon"></span></span>
<txt name="102">clipboard como pincel</txt>
</div>
<div class="botao" id="pinceis3"></div>
<txt name="16"> use this brush color</txt>
<label class="toggle">
<input id="custombrushcolor" type="checkbox" checked onchange="customBrushColor()" />
<span class="knob"></span>
</label>
</div>
<div id="menuconfiguracoes" class="fundobranco submenu naotoque" style="text-align: center; height: auto">
<span title="fechar" onmousedown="removeClass()" class="close"></span>
</div>
<div id="menuquadro" class="fundobranco submenu naotoque" style="text-align: center; height: auto">
<span class="botao">
<span title="fechar" onmousedown="removeClass()" class="close"></span>
<span onclick="mostraMenu('tamanho')">
<span class="icon2 canvassizeicon"></span>
<txt name="19">tamanho do quadro</txt>
</span>
</span>
<span id="oculos" class="botao">
<span class="icon2 sharpnessicon"></span>
<txt name="79">nitidez</txt>
<label class="toggle">
<input id="pixel" type="checkbox" value="true" checked onchange="pixel()" />
<span class="knob"></span>
</label>
</span>
<span class="botao">
<span class="mais"><span style="
position: relative;
width: 32px;
display: inline-block;
opacity: 0.5;
left: 2px;
top: 0px;
padding-top: 0px;
font-size: 20px;
"><span class="icon2 frameicon"></span></span>
<span style="
color: white;
position: absolute;
opacity: 0.5;
display: block;
width: 20px;
top: -5px;
left: 3px;
font-size: 20px;
"><span class="icon2 frameicon"></span></span>
</span>
<txt name="20">Transparencia do quadro</txt>
<input type="number" id="canvasOpacity" name="transparencia" min="0.01" max="1"
oninput="canvasOpacity(this.value)" step="0.01" value="1" style="width: 46px" />
</span>
<span class="botao">
<span class="bot">
<span class="icon2 undoicon"></span>
</span>
<txt name="95">max undo level</txt>
<input type="number" id="undolevel" name="undolevel" min="1" max="16"
oninput="historiaLimiteChange(this.value)" step="1" value="10" style="width: 46px" />
</span>
<span id="fundo falso" class="botao">
<txt name="22">Adicionar Fundo falso:</txt><br />
<txt name="76">como fundo do app?</txt>
<label class="toggle">
<input id="pagebg" type="checkbox" /><span class="knob"></span> </label><br />
<span onmousedown="Fundo('black')" class="bloquinho" style="background-color: hsla(0, 100%, 0%, 1)">
</span>
<span onmousedown="Fundo('white')" class="bloquinho" style="background-color: hsla(0, 100%, 100%, 1)">
</span>
<span onmousedown="Fundo('img/grid.png')" class="bloquinho"
style="background-image: url('./img/grid.png')">.</span>
<span onmousedown="Fundo('img/grid2.png')" class="bloquinho" style="
background-image: url('./img/grid2.png');
background-color: #fff;
"> </span>
<span onmousedown="Fundo('img/grid3.png')" class="bloquinho"
style="background-image: url('./img/grid3.png')"> </span>
<span onmousedown="Fundo('img')" class="bloquinho">🔗</span>
<span onmousedown="Fundo('clipboard')" class="icon clipboardicon bloquinho"></span>
<span onmousedown="Fundo('none')" class="bloquinho close" style="background-color: hsla(0, 100%, 100%, 0)">-
</span>
<span>
<label for="input2" class="custom-button">
<txt name="85">Seu arquivo</txt>
</label>
<input type="file" id="input2" accept=".png, .jpg, .jpeg, .gif .bmp" />
<br />
</span>
</span>
</div>
<div id="menupreencher" class="fundobranco submenu">
<span class="botao" onmousedown="removeClass()">
<span class="mais"><span class="icon2 bucketicon"></span></span>
<txt name="23" class="title">Preencher tudo </txt><span class="close"></span>
</span>
<span width="140px" style="margin: 8px 80px; display: block">
<span onmousedown="mudaCorBG('black')" class="bloquinho" style="background-color: hsla(0, 100%, 0%, 1)">
</span>
<span onmousedown="mudaCorBG('white')" class="bloquinho" style="background-color: hsla(0, 100%, 100%, 1)">
</span>
<span onmousedown="mudaCorBG('strokeColor')" id="preenchercor" class="bloquinho"
style="background-color: rgba(158, 239, 129, 0.28)">
</span>
<span title="cores" class="bot" onmousedown="mostraMenu('cores')"
style="background-color: rgba(247, 161, 165, 0.15)"><span class="icon coresicon"></span></span>
</span>
</div>
<div id="menuanime" class="fundobranco submenu">
<span class="botao"><span class="close" title="fechar menu enviar imagem" onmousedown="removeClass()">
</span>
<span class="icon configtimeicon"></span>
<txt name="24"> Velocidade da Animação</txt> <br /><small>
<txt name="25">Quadros Por Segundo</txt>
</small><br />
<input type="number" id="fpsnumber" min="1" max="60" step="1" value="8" onchange="changeFPS(this.value)"
style="width: 50px; margin-left: 8px" />
<span onmousedown="changeFPSup()" class="icon plusicon" style="float: right"></span>
<span onmousedown="changeFPSdown()" class="icon minusicon" style="float: right"></span>
<span onmousedown="play()" class="icon playicon" style="float: right"></span>
</span>
<!--span class="botao" onmousedown="cloneFrame()"> <span class="icon cloneframeicon"></span>
<txt name="27">Duplicar o quadro</txt>
</span>
<span class="botao"> <span class="mais"><span class="icon ghosticon"></span></span>
<txt name="21">Quadros visiveis</txt>
<label class="toggle"> <input type="checkbox" id="camadasnumber" onchange="ghost()"
style="width: 50px; margin-left: 8px" checked>
<span class="knob"></span>
</label>
</span-->
<span class="botao">
<span class="bot" onmousedown="swapL()"><span class="icon swaplefticon"></span></span>
<txt name="28">Mudar ordem do quadro</txt>
<span class="bot" onmousedown="swapR()"><span class="icon swaprighticon"></span></span>
</span>
<span class="botao">
<span class="icon ghosticon"></span>
<span>
<txt name="107">Animation line</txt>:
<input type="number" id="layernumber" min="0" step="1" value="0" onchange="changeLine(this.value)"
style="width: 50px; margin-left: 8px" />
<span onmousedown="changeLineButton(1)" class="icon plusicon" style="float: right"></span>
<span onmousedown="changeLineButton(-1)" class="icon minusicon" style="float: right"></span>
</span>
</span>
</div>
<div id="menuzoomx" class="fundobranco submenu">
<span class="close" title="fechar" onmousedown="removeClass()"></span>
<span onmousedown="scrollMoveCanva(-20,0)"><span class="icon2 lefticon"></span></span>
<span onmousedown="scrollMoveCanva(0,-20)"><span class="icon2 upicon"></span></span>
<span onmousedown="scrollMoveCanva(0,20)"><span class="icon2 downicon"></span></span>
<span onmousedown="scrollMoveCanva(20,0)"><span class="icon2 righticon"></span></span>
<span id="zoom2xbot" title="Ampliar" class="bot" onmousedown="resetZoom()">
<span class="icon zoomicon"></span><span class="textOver">1x</span></span>
<span id="zoom2xbot" title="Ampliar" class="bot" onmousedown="zoomMinus()"><span
class="icon zoomicon"></span><span class="textOver">-</span></span>
<span id="zoom2xbot" title="Ampliar" class="bot" onmousedown="zoom2x(1)"><span
class="icon zoomicon"></span><span class="textOver">+</span></span>
</div>
<div id="menuimagem" class="fundobranco submenu">
<span class="botao">
<span class="icon2 foldericon"> </span>
<txt name="98" class="title"> Carregue sua arte</txt>
<span class="close" title="fechar" onmousedown="removeClass()"></span>
</span>
<span class="botao">
<span class="icon projecticon"></span>
<txt name="50"> Caregar projeto</txt> .txt
<label for="inputTxt" class="custom-button">
<txt name="85">Seu arquivo</txt>
</label>
<input id="inputTxt" type="file" accept=".txt" onchange="openFile(event)" />
</span>
<span class="botao"><span class="icon2 frameicon"></span>
<txt name="29">Carregar imagen</txt>
<label for="input" class="custom-button">
<txt name="85">Seu arquivo</txt>
</label>
<input type="file" id="input" accept=".png, .jpg, .jpeg, .gif .bmp"
title="Enviar Arquivo de imagem" /><!-- name='files[]' multiple futurEiMPLEMENT-->
<span onmousedown="readURL2()" class="bloquinho">🔗</span>
<br />
<span class="icon2 canvassizeicon"></span>
<label class="toggle">
<input type="checkbox" id="ajustar" checked="true" />
<span class="knob"></span>
</label>
<txt name="30">Ajustar tela ao tamanho da imagem</txt><br />
</span>
<span class="botao" onmousedown="mostraMenu('spritesheet')">
<span class="icon ghosticon"></span>
<txt name="31">Enviar uma animação</txt><br />
</span>
</div>
<div id="menuspritesheet" class="fundobranco submenu">
<span class="botao">
<span class="icon ghosticon"></span>
<txt name="31">Enviar uma animação</txt><br />
<span id="custom" class="esconde">
<!--txt name="35">quantidade de quadros</txt><input type="number" id="fnumber" min="1" max="30"
step="1" value="2" style="width: 40px; margin-left: 8px"><br-->
<txt name="36"> largura:</txt>
<input id="larguraS" type="number" maxlength="4" max="1920" value="32" style="width: 60px; padding: 4px" />
px
<txt name="37">altura:</txt>
<input id="alturaS" type="number" maxlength="4" max="1920" value="32"
style="width: 60px; padding: 4px" />px<br />
</span>
<txt name="32">Auto detectar quadros </txt>
<label class="toggle">
<input type="checkbox" id="autodetectar" onchange="hidecustom()" />
<span class="knob"></span>
</label>
<label for="inputSprite" class="custom-button">
<txt name="85">Seu arquivo</txt>
</label>
<input type="file" id="inputSprite" accept=".png, .jpg, .jpeg, .gif .bmp" />
<span onmousedown="importSpriteUrl()" class="bloquinho">🔗</span>
</span>
<span class="botao">
<span onmousedown="changeLineButton(1)" class="icon plusicon"></span>
<txt name="106">This will draw over the current timeline so add a new line
before</txt>
<br />
</span>
<span class="botao">
<txt name="33">carregar como plano de fundo?</txt>
<label class="toggle">
<input type="checkbox" id="loadBackgroundAnimation" />
<span class="knob"></span>
</label>
<br />
<txt name="34">sobrepor plano de fundo</txt>
<label class="toggle">
<input type="checkbox" id="sobrepor" onchange="sobreporFundo()" />
<span class="knob"></span>
</label>
</span>
</div>
<div id="menucam" class="submenu fundobranco">
<span title="espelhar a camera" class="bot" onmousedown="flipCamera()">
<span class="icon selfieicon"></span></span>
<span id="btnChangeCam" title="Trocar camera" class="bot" onmousedown="changeCamera()">
<span class="icon changecam1"></span>
</span>
<span id="stopMotion" title="Modo de captura" class="bot" onmousedown="stopMotion()">
<span class="icon filmicon"></span>
</span>
<span title="Ajustes da camera" class="bot" onmousedown="mostraSubMenu('camconfig')">
<span class="icon camconfigicon"></span></span>
<span id="recMotion" title="Gravar automaticamente" class="bot" style="font-size: medium"
onmousedown="recMotion()">
<span class="icon recicon"></span></span><input id="times" type="number" value="8" min="2" step="1" max="24"
size="2" style="width: 42px" />
<span class="close" title="fechar camera" onmousedown="modeTo('cam')"></span><br />
<select id="select" class="esconde" onchange="trocaCamera()"></select>
<div id="zoomDiv" class="botao3">
<label for="zoom">Zoom</label>
<input type="range" id="zoom" title="Zoom" name="zoom" min="0.1" max="1" step="0.1" value="1" />
</div>
</div>
<div id="menuFX" class="fundobranco submenu">
<span class="botao" id="fx0"><span title="fechar efeitos" onmousedown="removeClass()" class="close"></span><span
class="icon2 fxicon"></span>
<txt name="83" class="title">Filtros</txt>
</span>
<div style="
display: block;
overflow: scroll;
min-height: 40px;
max-height: 180px;
width: 320px;
-ms-overflow-style: auto;
scrollbar-width: thin;
margin-bottom: 10px;
background-color: #ffffff22;
border-radius: 8px;
margin-right: auto;
margin-left: auto;
">
<span class="botao" onclick="FX(1)" id="fx1">
<span class="icon2 invert"></span>
<txt name="39">Invertido</txt>
</span>
<span class="botao" id="fx2">
<span class="icon2 blur"></span>
<input id="blurBar" type="range" min="0" max="10" step="0.1" onchange="FX(2)" />
<txt name="40">Desfoque</txt>
</span>
<span class="botao" id="fx3">
<span class="icon2 grayscale"></span>
<input id="grayscaleBar" title="escala de cinza" type="range" min="0" max="1" step="0.1" onchange="FX(3)" />
grayscale
</span>
<span class="botao" id="fx4">
<span class="icon2 sepia"></span>
<input id="sepiaBar" type="range" min="0" max="100" step="10" onchange="FX(4)" />
<txt name="41">Sepia</txt>
</span>
<span class="botao" id="fx5">
<span class="icon2 contrast"></span>
<input id="contrastBar" type="range" min="0" max="300" step="10" onchange="FX(5)" />
<txt name="42">Contraste</txt>
</span>
<span class="botao" id="fx6">
<span class="icon2 brightness"></span>
<input id="brightnessBar" type="range" min="0" max="300" step="10" onchange="FX(6)" />
<txt name="59">Brightness</txt>
</span>
<span class="botao" id="fx7">
<span class="icon2 lumakey"></span>
<input id="lumakeyBar" type="range" min="0" max="255" step="5" value="220" onchange="FX(7)" />
<txt name="84">Apagar o branco</txt>
</span>
<span class="botao" id="fx8"><span class="icon2 hue-rotate"></span>
<input id="hue-rotateBar" type="range" min="0" max="355" step="5" onchange="FX(8)" />
<txt name="91">hue</txt>
</span>
</div>
<span id="confirmFX" class="esconde">aplicar o efeito <br />
<span onClick="cancelaFX()" class="shadow">
<span class="icon closeicon"></span>
</span>
<div class="shadow" onClick="applyFX(1)">
<txt name="39"> invert</txt> <span class="icon2 check"></span>
</div>
</span>
</div>
<div class="fundobranco submenu" id="menusalvar">
<span class="botao">
<span class="icon2 saveicon"></span>
<txt name="44">Título:</txt>
<input id="filename" type="text" alt="Nome do arquivo" placeholder="Nome do arquivo" value="desenho"
onfocus="this.value=''" style="width: 180px" />
<span class="close" title="fechar menu apagar" onmousedown="removeClass()"></span>
</span>
<span class="botao" onclick="export2txt()">
<txt name="49">Exportar projeto </txt> .txt
<span class="icon projecticon"></span>
</span>
<span class="botao" onclick="salvaImagem()">
<txt name="43">Salvar quadro atual</txt> .png
<span class="icon2 frameicon"></span>
</span>
<span class="botao">
<span class="icon filmicon" onclick="export_anim()"></span>
<txt name="46">Exportar Gif animado</txt> .gif
<label class="toggle">
<input type="checkbox" id="gif" checked="true" />
<span class="knob"></span>
</label>
<br />
<txt name="45">Exportar sequencia de quadros</txt> .png
<label class="toggle">
<input type="checkbox" id="seq" checked="true" />
<span class="knob"></span>
</label>
<br />
<txt name="47">Unir quadro com fundo</txt>
<label class="toggle">
<input type="checkbox" id="unir" />
<span class="knob"></span>
</label>
</span>
<!--span class="botao">
<span class="icon filmicon" onclick="export_animBack()"></span>
<txt name="45">Exportar sequencia de quadros</txt>
</span-->
</div>
<div id="menurecortar" class="fundobranco submenu">
<span class="botao"><span class="close" onmousedown="removeClass()"></span>
<span class="icon alerticon"></span>
<txt name="88">Salvar antes?</txt>
<span id="salvar" title="salvar imagem" class="bot" onclick="mostraMenu('salvar')">
<span class="icon2 saveicon"></span>
</span>
</span>
<span id="autorecortarbot" title="Recotar automaticamente" class="botao" onclick="cortar(true)"><img
src="img/crop.png" />
<txt name="51"> Recortar automaticamente </txt><span style="
display: inline-block;
width: 12px;
height: 12px;
border: green dashed 2px;
"></span>
</span>
<span id="recortarbot" title="Recotar para seleção" class="botao" onclick="cortar()"><img src="img/crop.png" />
<txt name="52"> Recortar para seleção</txt>
<span style="
display: inline-block;
width: 20px;
height: 12px;
border: red dashed 2px;
"></span>
</span>
</div>
<div id="menuhelp" class="fundobranco submenu">
<span class="botao">
<span class="icon2 helpicon"></span>
<txt name="101" class="title">Ajuda</txt>
<span title="fechar" onmousedown="removeClass()" class="close"></span>
</span>
<span id="helpcontent" class="botao"> </span>
</div>
<div id="menuredimensionar" class="fundobranco submenu">
<span class="botao">
<span class="close" onmousedown="removeClass()"></span>
<span class="icon2 scaleicon"></span>
<txt name="86">Scale canvas</txt>
<!--span class="bot" onclick="doubleImageSize()">2x</span-->
</span>
<span class="botao">
<span class="icon2 canvassizeicon"></span>
<txt name="87">scale all?</txt>
<label class="toggle">
<input type="checkbox" id="scaleall" />
<span class="knob"></span> </label><br />
<span class="iconsmall alerticon"></span>
<txt name="88">Salvar antes?</txt>
<span id="salvar" title="salvar imagem" class="bot" onclick="mostraMenu('salvar')">
<span class="icon2 saveicon"></span></span>
</span>
<span id="redimensionarbot" title="Recotar automaticamente" class="botao">
scale by center?
<label class="toggle">
<input type="checkbox" id="scalecenter" />
<span class="knob"></span> </label><br />
<txt name="104">proporcao</txt>
<label class="toggle">
<input type="checkbox" id="cadeado" />
<span class="knob"></span> </label><br />
Width :
<input type="number" id="canvasWidth" value="320" style="width: 80px" />
Height:
<input type="number" id="canvasHeight" value="320" style="width: 80px" />
<button id="resizeButton">OK</button><br />
</span>
</div>
<div id="menupaste" class="fundobranco submenu">
<!--span class="botao"> <span class="close" onmousedown="removeClass()"></span>
<span class="icon clipboardicon"></span> <span class="title"> Clipboard</span></span>
<span class="icon2 rotateicon"></span>
<input id="canvasfrontdeg" type="number" maxlength="3" max="360" value="0" step="6"
style="width:60px; height:26px; padding: 4px; margin-top: 4px;" class="floatleft"
onchange="transformClip()" />
<span class="icon2 scaleicon"></span>
<input id="canvasfrontscale" type="number" maxlength="3" max="400" value="100" step="1"
style="width:60px; height:26px; padding: 4px; margin-top: 4px;" class="floatleft"
onchange="transformClip()" /><span
style="width:30px; height:26px; padding: 4px; margin-top: 4px; font-weight: 700;"
class="floatleft">%</span>
<span class="mais" onclick="flipClip()">
<span id="mirror2" class="iconsmall mirroricon"></span>
</span>
<span class="mais" onmousedown="limpar('clipboard')">
<span id="lixeira" class="iconsmall lixeiraicon"></span>
</span><br><br>
<span style="display: block; width: 320px; max-height: 160px; overflow: auto;">
<span id="clipboard"></span>
</span-->