Geometry
ExtrusionGL
LightsGL
Esfera
Yellowtail
Textured Sphere
Space Junk
Shared Canvas (Client)
Shared Canvas (Server)
HTTP Client
Chat Server
Yahoo! Search
Carnivore Client
Simple Read
Simple Write
Call / Response
Duplex
Multiple Ports
Getting Started (Capture)
Frame Differencing
Background Subtraction
Brightness Thresholding
Brightness Tracking
Mirror
Mirror2
Color Sorting
ASCII Video
Framingham
HSV Space
Live Pocky
Radial Pocky
Loop
Pixelate
DrawingMovie
One Frame
Multiple Frames
Mouse Press
Large Page
Many Pages
Many PDFs
Random Book
Complex 3D
Simple Export
Add Listener
Band Pass Filter
Forward FFT
Frequency Energy
Get Line In
Get Line Out
Get Meta Data
Get Set Pan
Linear Averages
Load File
Load Sample
Load Snippet
Record Line In
Sine Wave Signal
User Defined Effect
User Defined Signal
This example is for Processing version 1.0+. If you have a previous version, use the examples included with your software. If you see any errors or have comments, please let us know .
Many PDFs.
Saves one PDF file each each frame while the mouse is pressed. When the mouse is released, the PDF creation stops.
import processing.pdf.*;
boolean savePDF = false;
void setup() {
size(600, 600);
frameRate(24);
}
void draw() {
if(savePDF == true) {
beginRecord(PDF, "lines" + frameCount + ".pdf");
}
background(255);
stroke(0, 20);
strokeWeight(20.0);
line(mouseX, 0, width-mouseY, height);
if(savePDF == true) {
endRecord();
}
}
void mousePressed() {
savePDF = true;
}
void mouseReleased() {
savePDF = false;
}