working on pdf integration and record() stuff.. tweaking up api

This commit is contained in:
benfry
2006-01-11 18:15:58 +00:00
parent 9e1a8a38ee
commit 68808f9e79
10 changed files with 177 additions and 121 deletions

View File

@@ -22,11 +22,11 @@ public class PGraphicsPDF extends PGraphics2 {
// recording api.. allow multiple frames per file?
// would be the case for video, or for pdf
static public String filename;
//static public String filename;
File temp;
int frameCount;
File file; // = new File("test.pdf");
File file;
Document document;
PdfWriter writer;
PdfContentByte content;
@@ -36,9 +36,11 @@ public class PGraphicsPDF extends PGraphics2 {
// BaseFont baseFont = mapper.awtToPdf(java.awt.Font awtFont)
public PGraphicsPDF(int width, int height, PApplet applet) { //File file) {
public PGraphicsPDF(int width, int height, PApplet applet, String path) {
super(width, height, null);
//this.file = file;
if (path == null) path = "output.pdf";
this.file = new File(path);
// don't want to require PApplet as the way to do this.. but how?
//if (applet != null) {