PDF recording issue
in
Core Library Questions
•
1 year ago
Hey I am new to the forum and like to say hello!
console error message:
isRecording(), or this particular variation of it, is not available with this renderer.
And yes I already read about those problem. ( http://forum.processing.org/topic/can-i-disable-clipping-in-pdf-output )
But it doesn't matter if I chose the JAVA2D renderer for the output. The output file is still blank and white.
Code:
import processing.pdf.*;
float px, py;
int distance = 200;
void setup() {
size(700, 280,JAVA2D);
frameRate(5);
background(0);
beginRecord(PDF, "output.pdf");
}
void keyPressed() {
if (key == 'q') {
endRecord();
exit();
}
}
void draw() {
float x = px + random(-distance, distance);
float y = py + random(-distance, distance);
noFill();
stroke(255);
line(px, py, x, y);
px = x;
py = y;
if ( x > width) {
px = width;
}
if (x < 0) {
px = 0;
}
if ( y > height) {
py = height;
}
if ( y < 0) {
py = 0;
}
}
what can I do?
regards
console error message:
isRecording(), or this particular variation of it, is not available with this renderer.
And yes I already read about those problem. ( http://forum.processing.org/topic/can-i-disable-clipping-in-pdf-output )
But it doesn't matter if I chose the JAVA2D renderer for the output. The output file is still blank and white.
Code:
import processing.pdf.*;
float px, py;
int distance = 200;
void setup() {
size(700, 280,JAVA2D);
frameRate(5);
background(0);
beginRecord(PDF, "output.pdf");
}
void keyPressed() {
if (key == 'q') {
endRecord();
exit();
}
}
void draw() {
float x = px + random(-distance, distance);
float y = py + random(-distance, distance);
noFill();
stroke(255);
line(px, py, x, y);
px = x;
py = y;
if ( x > width) {
px = width;
}
if (x < 0) {
px = 0;
}
if ( y > height) {
py = height;
}
if ( y < 0) {
py = 0;
}
}
what can I do?
regards
1