Clean up the footer writer section of the preprocessor for easier reading but also fix adding and looking for --full-screen which appears to have been left off at some point.
This commit is contained in:
A Pottinger
2022-06-21 08:34:44 -07:00
parent fa8eef0e8e
commit ece11f9345
5 changed files with 79 additions and 7 deletions
@@ -11,8 +11,10 @@ import java.io.IOException;
import java.util.Optional;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.Test;
import processing.app.Preferences;
import processing.app.SketchException;
import processing.mode.java.preproc.PreprocessorResult;
import processing.mode.java.preproc.PdePreprocessIssueException;
@@ -25,6 +27,11 @@ public class ParserTests {
ProcessingTestUtil.init();
}
@Before
public void before() {
Preferences.setBoolean("export.application.fullscreen", false);
}
static void expectRecognitionException(final String id,
final int expectedLine) {
@@ -432,7 +439,8 @@ public class ParserTests {
@Test
public void testMultiMultilineString() {
expectGood("multimultilinestr");
Preferences.setBoolean("export.application.fullscreen", true);
expectGood("fullscreen_export");
}
}
@@ -0,0 +1,39 @@
import processing.core.*;
import processing.data.*;
import processing.event.*;
import processing.opengl.*;
import java.util.HashMap;
import java.util.ArrayList;
import java.io.File;
import java.io.BufferedReader;
import java.io.PrintWriter;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.IOException;
public class fullscreen_export extends PApplet {
int x = 0;
public void setup() {
background(0);
noStroke();
fill(102);
}
public void draw() {
rect(x, height*0.2f, 1, height*0.6f);
x = x + 2;
}
static public void main(String[] passedArgs) {
String[] appletArgs = new String[] { "--full-screen", "--bgcolor=null", "--hide-stop", "fullscreen_export" };
if (passedArgs != null) {
PApplet.main(concat(appletArgs, passedArgs));
} else {
PApplet.main(appletArgs);
}
}
}
+12
View File
@@ -0,0 +1,12 @@
int x = 0;
void setup() {
background(0);
noStroke();
fill(102);
}
void draw() {
rect(x, height*0.2, 1, height*0.6);
x = x + 2;
}