-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCamara.pde
More file actions
79 lines (67 loc) · 1.33 KB
/
Copy pathCamara.pde
File metadata and controls
79 lines (67 loc) · 1.33 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
class Camara {
String estado;
Grilla grilla;
Camara() {
grilla = new Grilla();
}
}
//-------------------------------------------------------
class Grilla {
float bordeSize = 30;
float espaciado = unidad;
void Update() {
if (desarrollador) {
Bordes();
Vertical();
Horizontal();
EsquinaBorde();
}
}
void Bordes() {
pushStyle();
fill(80);
noStroke();
rect(0, 0, width, bordeSize);
rect(0, 0, bordeSize, height);
popStyle();
}
void EsquinaBorde() {
pushStyle();
noStroke();
fill(80, 50, 50);
rect(0, 0, bordeSize, bordeSize);
popStyle();
}
void Vertical() {
pushMatrix();
translate(transX, 0);
pushStyle();
stroke(0, 70);
textSize(14);
fill(220);
for (int i=-50; i < 100; i+=1) {
float posX = i * espaciado;
float posY = 0;
line(posX, posY, posX, height-posY);
text(i, posX-(10), posY+(18));
}
popStyle();
popMatrix();
}
void Horizontal() {
pushMatrix();
translate(0, transY);
pushStyle();
stroke(0, 70);
textSize(14);
fill(220);
for (int i=-50; i < 100; i+=1) {
float posX = 0;
float posY = i * espaciado;
line(posX, posY, width-posX, posY);
text(i, posX+2, posY+4);
}
popStyle();
popMatrix();
}
}//end class