-
Notifications
You must be signed in to change notification settings - Fork 0
/
Graphics.pde
48 lines (39 loc) · 910 Bytes
/
Graphics.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
public abstract class Graphics {
//PGraphics graphics;
String details = "";
int w, h;
float padding;
Grid myGrid;
int yoffset;
Graphics (Poster poster, Grid _grid) {
myGrid = _grid;
w = myGrid.w;
h = myGrid.h;
padding = poster.padding;
calculateYoffset();
makeDecisions();
addBackgroundToPoster();
design();
inspector.addToMeta(details);
}
abstract void makeDecisions();
void addBackgroundToPoster() {
poster.content.beginDraw();
poster.content.background(poster.colorScheme.backgroundColor);
poster.content.endDraw();
}
abstract void design();
void addToDetails(String s) {
details += s;
}
void calculateYoffset() {
if (myGrid.index == 0 || myGrid.fullHeight) {
yoffset = 0;
} else {
yoffset = poster.grids.get(0).h;
}
}
//void initPGraphics(){
// graphics = createGraphics(w,h);
//}
}