-
Notifications
You must be signed in to change notification settings - Fork 0
/
createLogo.pde
108 lines (103 loc) · 3.18 KB
/
createLogo.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
PGraphics BigLogo;
void createLogo (){
PGraphics pg,pg2;
//image (splashScreen,width/2,height/2, width, height);
pushStyle ();
pg=createGraphics (width/2,height);
pg2=createGraphics (width/2,height);
BigLogo=createGraphics (width,height);
pg.beginDraw ();
pg.background (200,200,200,0);
pg.stroke (color (255,255,255));
pg.strokeWeight(4);
pg.ellipseMode (CENTER);
pg.fill (color (0,0,255));
pg.ellipse (width/2,height/2,height/2-10,height/2-10);
pg.textSize (height/4);
float tf=pg.textAscent () +pg.textDescent ();
pg.textAlign (RIGHT);
pg.fill (color (200,0,0));
pg.text ("á ",width/2,(height+tf)/2);
pg.fill (color (0,0,0));
pg.text ("a ",width/2,(height+tf)/2);
pg.endDraw ();
pg2.beginDraw ();
pg2.background (200,200,200,0);
pg2.strokeWeight(4);
pg2.stroke (color (255,255,255));
pg2.ellipseMode (CENTER);
pg2.fill (color (255,0,0));
pg2.ellipse (0,height/2,height/2-10,height/2-10);
pg2.textSize (height/4);
tf=pg2.textAscent () +pg.textDescent ();
pg2.textAlign (LEFT);
pg2.fill (color (0,0,200));
pg2.text (" á", 0,(height+tf)/2);
pg2.fill (0);
pg2.text (" a", 0,(height+tf)/2);
pg2.textAlign (CENTER );
pg2.endDraw ();
BigLogo.beginDraw ();
BigLogo.textAlign (CENTER);
BigLogo.imageMode (CENTER);
BigLogo.image (pg,width/4, height/2);
BigLogo.image (pg2,width*0.75, height/2);
BigLogo.textSize (height/4);
BigLogo.fill (255,255,255, 255);
BigLogo.text (">",width/2, (height+tf)/2);
BigLogo.text ("daltonaid",width/2,height-10);
BigLogo.endDraw ();
popStyle ();
}
void createIcon(int w,int h){
PGraphics pg,pg2;
PGraphics Icono;
//image (splashScreen,w/2,h/2, w, h);
pushStyle ();
pg=createGraphics (w/2,h);
pg2=createGraphics (w/2,h);
Icono=createGraphics (w,h);
pg.beginDraw ();
pg.background (200,200,200,0);
pg.stroke (color (255,255,255));
pg.strokeWeight(4);
pg.ellipseMode (CENTER);
pg.fill (color (0,0,255));
pg.ellipse (w/2,h/2,h/2-1,h/2-1);
pg.textSize (h/4);
float tf=pg.textAscent () +pg.textDescent ();
pg.textAlign (RIGHT);
pg.fill (color (200,0,0));
pg.text ("á ",w/2,(h+tf)/2);
pg.fill (color (0,0,0));
pg.text ("a ",w/2,(h+tf)/2);
pg.endDraw ();
pg2.beginDraw ();
pg2.background (200,200,200,0);
pg2.strokeWeight(4);
pg2.stroke (color (255,255,255));
pg2.ellipseMode (CENTER);
pg2.fill (color (255,0,0));
pg2.ellipse (0,h/2,h/2-1,h/2-1);
pg2.textSize (h/4);
tf=pg2.textAscent () +pg.textDescent ();
pg2.textAlign (LEFT);
pg2.fill (color (0,0,200));
pg2.text (" á", 0,(h+tf)/2);
pg2.fill (0);
pg2.text (" a", 0,(height+tf)/2);
pg2.textAlign (CENTER );
pg2.endDraw ();
Icono.beginDraw ();
Icono.textAlign (CENTER);
Icono.imageMode (CENTER);
Icono.image (pg,w/4, h/2);
Icono.image (pg2,w*0.75, h/2);
Icono.textSize (h/4);
Icono.fill (255,255,255, 255);
Icono.text (">",w/2, (h+tf)/2);
Icono.endDraw ();
popStyle ();
/* You could need change permissions for this to work */
Icono.save ("/sdcard/Daltonaid-Icono-"+str (w)+"x"+str (h)+".png");
}