-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGridUnitsSVG.pde
70 lines (61 loc) · 2.38 KB
/
GridUnitsSVG.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
import processing.svg.*;
PFont font;
CustomGrid customGrid = new CustomGrid();
void setup(){
size(1024, 1024);
font = createFont("SansSerif", 32);
textFont(font);
}
void draw(){
//customGrid.StrokeWidth(4).Corner(1, CornerPattern.Plus, width/12).render();
//customGrid.StrokeWidth(4).Corner(1, CornerPattern.Cross, width/12).render();
customGrid.StrokeWidth(4).Corner(1, CornerPattern.Circle, width/12).render();
}
void keyPressed(){
switch(key){
case 's':
customGrid.StrokeWidth(4).Dashed(false); // style
customGrid.Main(1).export();
customGrid.Main(2).export();
customGrid.Main(4).export();
customGrid.Main(5).export();
customGrid.StrokeWidth(4).Dashed(false); // style
customGrid.SubGrid(1, 2).export();
customGrid.SubGrid(2, 2).export();
customGrid.SubGrid(2, 5).export();
customGrid.SubGrid(4, 2).export();
customGrid.SubGrid(4, 4).export();
customGrid.SubGrid(4, 5).export();
customGrid.SubGrid(5, 4).export();
customGrid.SubGrid(5, 5).export();
customGrid.StrokeWidth(4).Dashed(true); // style
customGrid.Main(1).export();
customGrid.Main(2).export();
customGrid.Main(4).export();
customGrid.Main(5).export();
customGrid.StrokeWidth(4).Dashed(true); // style
customGrid.SubGrid(1, 2).export();
customGrid.SubGrid(2, 2).export();
customGrid.SubGrid(2, 5).export();
customGrid.SubGrid(4, 2).export();
customGrid.SubGrid(4, 4).export();
customGrid.SubGrid(4, 5).export();
customGrid.SubGrid(5, 4).export();
customGrid.SubGrid(5, 5).export();
customGrid.StrokeWidth(8); // style
customGrid.Corner(1, CornerPattern.Plus, width/12).export();
customGrid.Corner(1, CornerPattern.Cross, width/12).export();
customGrid.Corner(1, CornerPattern.Circle, width/12).export();
customGrid.StrokeWidth(4); // style
customGrid.Corner(2, CornerPattern.Plus, width/24).export();
customGrid.Corner(2, CornerPattern.Cross, width/24).export();
customGrid.Corner(2, CornerPattern.Circle, width/24).export();
customGrid.Corner(4, CornerPattern.Plus, width/48).export();
customGrid.Corner(4, CornerPattern.Cross, width/48).export();
customGrid.Corner(4, CornerPattern.Circle, width/48).export();
exit();
break;
default:
break;
}
}