|
|
@@ -10,7 +10,8 @@ class Bounder { |
|
|
|
} |
|
|
|
PVector p1, p2, p3, p4; |
|
|
|
void click() { |
|
|
|
if (state < 4) state++; |
|
|
|
if (state < 3) state++; |
|
|
|
else state = 1; |
|
|
|
if (state == 1) { |
|
|
|
p1 = new PVector(mouseX, mouseY); |
|
|
|
loop(); |
|
|
@@ -39,8 +40,6 @@ class Bounder { |
|
|
|
line(p1.x, p1.y, mouseX, mouseY); |
|
|
|
} |
|
|
|
if (state > 1) { |
|
|
|
//stroke(1); |
|
|
|
//line(p1.x, p1.y, p2.x, p2.y); |
|
|
|
fill(0); |
|
|
|
noStroke(); |
|
|
|
circle(p2.x, p2.y, 5); |
|
|
@@ -61,6 +60,12 @@ class Bounder { |
|
|
|
} |
|
|
|
|
|
|
|
void compile(boolean Execute) { |
|
|
|
|
|
|
|
if (Execute) { |
|
|
|
state = 0; |
|
|
|
covers.add(new Cover(p1, p2, p4, p3)); |
|
|
|
} |
|
|
|
|
|
|
|
PVector ptopmid = new PVector((p1.x + p2.x)/2, (p1.y + p2.y)/2); |
|
|
|
PVector pbotmid = new PVector((p3.x + p4.x)/2, (p3.y + p4.y)/2); |
|
|
|
|
|
|
@@ -99,11 +104,17 @@ class Bounder { |
|
|
|
println(cmdright); |
|
|
|
//execl("/bin/sh", "-c", "cd", (const char *)0); |
|
|
|
//exec("/bin/sh -c cd " + folderURI + " && " + cmdleft); |
|
|
|
|
|
|
|
|
|
|
|
//String[] runConvert = { "/bin/bash", "-c", "cd " + folderURI + " && mkdir " + folderName + " && " + cmdleft + " && " + cmdright + " && " + cmdpdf }; |
|
|
|
String[] runConvert = { "/bin/bash", "-c", "cd " + folderURI + " && mkdir " + folderName + " && " + cmdleft + " && " + cmdright }; |
|
|
|
|
|
|
|
if(Execute) exec(runConvert); |
|
|
|
|
|
|
|
if (Execute) exec(runConvert); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//println(leftLeftTopX + "," + leftLeftTopY + " " + leftRightTopX + "," + leftRightTopY + " " + leftRightBotX + "," + leftRightBotY + " " + leftLeftBotX + "," + leftLeftBotY); |
|
|
|
//println(rightLeftTopX + "," + rightLeftTopY + " " + rightRightTopX + "," + rightRightTopY + " " + rightRightBotX + "," + rightRightBotY + " " + rightLeftBotX + "," + rightLeftBotY); |