| [ Web Proxy ] |
| Viewing: https://processing.org/reference/beginRecord_.html | [Back] [Original] |
Opens a new file and all subsequent drawing functions are echoed to this
file as well as the display window. The beginRecord() function
requires two parameters, the first is the renderer and the second is the
file name. This function is always used with endRecord() to stop the
recording process and close the file.
Note that beginRecord() will only pick up any settings that happen
after it has been called. For instance, if you call textFont()
before beginRecord(), then that font will not be set for the file
that you're recording to.
beginRecord() works only with the PDF and SVGrenderers.
import processing.pdf.*;
void setup() {
size(400, 400);
beginRecord(PDF, "everything.pdf");
}
void draw() {
ellipse(mouseX, mouseY, 10, 10);
}
void mousePressed() {
endRecord();
exit();
}
beginRecord(renderer, filename)renderer(String)PDF orSVGfilename(String)filename foroutputPGraphics or void
[Creative Commons License]This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
| Web Proxy Viewer | New URL | Original Page |