mirror of
https://github.com/processing/processing4.git
synced 2026-05-05 10:25:38 +02:00
This commit is contained in:
23
java/examples/Library/PDF Export/OneFrame/OneFrame.pde
Normal file
23
java/examples/Library/PDF Export/OneFrame/OneFrame.pde
Normal file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* One Frame.
|
||||
*
|
||||
* Saves one PDF with the contents of the display window.
|
||||
* Because this example uses beginRecord, the image is shown
|
||||
* on the display window and is saved to the file.
|
||||
*/
|
||||
|
||||
|
||||
import processing.pdf.*;
|
||||
|
||||
size(600, 600);
|
||||
|
||||
beginRecord(PDF, "line.pdf");
|
||||
|
||||
background(255);
|
||||
stroke(0, 20);
|
||||
strokeWeight(20.0);
|
||||
line(200, 0, 400, height);
|
||||
|
||||
endRecord();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user