PDF Variations
in
Core Library Questions
•
2 years ago
Hi folks,
I was just wondering if anyone has encountered the following behavior with PDF. Given a fixed set of drawing instructions:
When using the following code to create the PDF:
setup()
size(x,y, PDF, "filename");
......
draw()
.... do a bunch of stuff
if(alldone) exit();
everything works. In fact this is the way I've always created PDFs in the past
Today I decided to try out the following code for creating PDFs:
setup()
size(x,y);
......
beginRecord(PDF, "Lines.pdf");
}
draw()
.... do a bunch of stuff
if(alldone) { endRecord(); exit()}
while the PDF is still created, it is missing a lot of the lines that were drawn.
In the above image, the sketch on the right is the PDF that was created by the first code example. The sketch on the left is the PDF created by the second code example.
Note that the nice thing about the beginRecord()/endRecord() method (the 2nd example) is that you can watch the progress of the sketch on your screen.
Note that I'm using Processing 1.2.1 on Windows XP.
Thanks in advance, Jim
I was just wondering if anyone has encountered the following behavior with PDF. Given a fixed set of drawing instructions:
When using the following code to create the PDF:
setup()
size(x,y, PDF, "filename");
......
draw()
.... do a bunch of stuff
if(alldone) exit();
everything works. In fact this is the way I've always created PDFs in the past
Today I decided to try out the following code for creating PDFs:
setup()
size(x,y);
......
beginRecord(PDF, "Lines.pdf");
}
draw()
.... do a bunch of stuff
if(alldone) { endRecord(); exit()}
while the PDF is still created, it is missing a lot of the lines that were drawn.
In the above image, the sketch on the right is the PDF that was created by the first code example. The sketch on the left is the PDF created by the second code example.
Note that the nice thing about the beginRecord()/endRecord() method (the 2nd example) is that you can watch the progress of the sketch on your screen.
Note that I'm using Processing 1.2.1 on Windows XP.
Thanks in advance, Jim
1