-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve PDF renderer parse issue in preproc.
Resolve moving the PDF renderer information provided in size into settings as part of preproc. Resolves #66.
- Loading branch information
1 parent
3b0ff8f
commit 6fe274f
Showing
4 changed files
with
79 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import processing.core.*; | ||
import processing.data.*; | ||
import processing.event.*; | ||
import processing.opengl.*; | ||
|
||
import processing.pdf.*; | ||
|
||
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 pdfwrite extends PApplet { | ||
|
||
|
||
|
||
public void setup() { | ||
/* size commented out by preprocessor */; | ||
} | ||
|
||
public void draw() { | ||
// Draw something good here | ||
line(0, 0, width/2, height); | ||
|
||
// Exit the program | ||
println("Finished."); | ||
exit(); | ||
} | ||
|
||
|
||
public void settings() { size(400,400,PDF,"filename.pdf"); } | ||
|
||
static public void main(String[] passedArgs) { | ||
String[] appletArgs = new String[] { "pdfwrite" }; | ||
if (passedArgs != null) { | ||
PApplet.main(concat(appletArgs, passedArgs)); | ||
} else { | ||
PApplet.main(appletArgs); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import processing.pdf.*; | ||
|
||
void setup() { | ||
size(400, 400, PDF, "filename.pdf"); | ||
} | ||
|
||
void draw() { | ||
// Draw something good here | ||
line(0, 0, width/2, height); | ||
|
||
// Exit the program | ||
println("Finished."); | ||
exit(); | ||
} |