Quantcast
Viewing all articles
Browse latest Browse all 1768

Saved PDF is blank :(

Hello guys :)

I have a short question.

Why does the following Sketch give me a blank pdf?

  1. import processing.pdf.*;

  2. boolean record;

  3. void setup () {
  4.   size(600, 600);
  5.   smooth();
  6.   background(255);
  7. }

  8. void draw () {
  9.   
  10.    if (record) {
  11.     beginRecord(PDF, "frame-####.pdf"); 
  12.   }


  13.  stroke (0,0,0);
  14.  line(frameCount*100, 600 , frameCount*100, 0);
  15.   
  16.    
  17.  if (record) {
  18.     endRecord();
  19.   record = false;
  20.   }
  21. }
  22.    
  23. void keyPressed() {
  24.  record = true;

  25. }

Viewing all articles
Browse latest Browse all 1768

Trending Articles