-
Notifications
You must be signed in to change notification settings - Fork 0
/
ModesAndCommands.pde
94 lines (74 loc) · 1.74 KB
/
ModesAndCommands.pde
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
void rectangle_mode() {
stopAllDrawHandlers();
activeCursor = ARROW;
activeDrawer = rubberBandRectangle;
activeDrawer.start();
}
void triangle_mode() {
stopAllDrawHandlers();
activeCursor = ARROW;
activeDrawer = rubberBandTriangle;
activeDrawer.start();
}
void ellipse_mode() {
stopAllDrawHandlers();
activeCursor = ARROW;
activeDrawer = rubberBandEllipse;
activeDrawer.start();
}
void freehandBrushStandard_mode() {
stopAllDrawHandlers();
activeCursor = ARROW;
activeDrawer = freehandBrushStandard;
activeDrawer.start();
}
void freehandBrushDots_mode() {
stopAllDrawHandlers();
activeCursor = ARROW;
activeDrawer = freehandBrushDots;
activeDrawer.start();
}
void freehandBrushPaintEffect_mode() {
stopAllDrawHandlers();
activeCursor = ARROW;
activeDrawer = freehandBrushPaintEffect;
activeDrawer.start();
}
void selection_mode() {
stopAllDrawHandlers();
activeCursor = CROSS;
activeDrawer = rubberBandSelection;
activeDrawer.start();
selectionController.mode("mark").start();
}
void blur_mode() {
stopAllDrawHandlers();
activeCursor = ARROW;
activeDrawer = rubberBandSelection;
activeDrawer.start();
selectionController.mode("blur").start();
}
//TODO doesn't work
void interactiveCopyPaste_mode() {
selection_mode();
selectionController.mode("interactivePaste").start();
}
void undo() {
try { undoManager.undo(); } catch(Exception e) {};
}
void redo() {
try { undoManager.redo(); } catch(Exception e) {};
}
void toggleSoundAndMovement() {
scanningController.toggleSound();
scanningController.toggleMovement();
}
void toggleSound() {
scanningController.toggleSound();
}
void clear_workbuffer() {
imageManager.clear();
}
void toggle_help() {
onscreenHelp.toggle();
}