LoginSignup
6
6

More than 5 years have passed since last update.

processingでPDF書き出し

Last updated at Posted at 2015-10-29

Processingではスケッチの内容をPDFとして書き出すことができます。
setup()関数でbeginRecordを実行して、保存したいところでendRecordを
実行すればいいのですが、書き出されたイメージの色がおかしくなる場合が
あります。その場合はcolorModeを設定する前にbeginrecordを実行する
ことで解消されます。


void setup () {
    size (640, 480);
    beginRecord (PDF, "test.pdf");
    colorMode (HSB, 256);
}

void draw () {
    ellipse (random (width), random (height), 10, 10);
}

void mousePressed () {
    endRecord ();
    exit ();
}

6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6