-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAbstractDisplay.pde
More file actions
57 lines (43 loc) · 1.12 KB
/
Copy pathAbstractDisplay.pde
File metadata and controls
57 lines (43 loc) · 1.12 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
color COLOR_GREEN = color(0,180,0,100);
abstract class AbstractDisplay implements DisplayInterface {
boolean hidden;
ARect bound;
AbstractDisplay(ARect bound) {
this.bound = bound;
}
void toggleHidden() {
this.hidden = !hidden;
}
boolean isHidden() {
return hidden;
}
void setHidden(boolean h) {
this.hidden = h;
}
void draw(PGraphics g) {
g.push();
g.textSize(50);
g.fill(255,100,222);
g.text("Implement Me", 1,51);
g.pop();
}
void drawOn(PGraphics localG, PGraphics mainG, ARect bound) {
drawOn(localG, mainG, bound, 150);
}
void drawOn(PGraphics localG, PGraphics mainG, ARect bound, int alpha) {
mainG.push();
//mainG.background(0, 1);
//mainG.tint(255,alpha);
mainG.image(localG, bound.originX, bound.originY, bound.width, bound.height);
mainG.pop();
}
float mapCtrl(float controlValue, float min, float max) {
return map(controlValue, MIN_CONTROL, MAX_CONTROL, min, max);
}
float mapCtrlA(float min, float max) {
return mapCtrl(controlA, min, max);
}
void bang() {
println("Bang!");
}
}