Name |
beginRecord()开始记录 |
||||||
Examples |
import processing.pdf.*;
void setup() { size(400, 400); beginRecord(PDF, “everything.pdf”); }
void draw() { ellipse(mouseX, mouseY, 10, 10); }
void mousePressed() { endRecord(); exit(); } |
||||||
Description |
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 SVG renderers. 打开一个新文件, 所有后续的绘图函数都将与此文件以及显示窗口相呼应。beginRecord () 函数需要两个参数, 第一个是渲染器, 另一个是文件名。此函数始终与 endRecord () 一起使用以停止录制过程并关闭文件。
请注意, beginRecord () 只会拾取在调用后发生的任何设置。例如, 如果在 beginRecord () 之前调用 textFont (), 则不会为要录制的文件设置该字体。
beginRecord () 仅适用于 pdf 和 svg 器。 |
||||||
Syntax |
beginRecord(renderer, filename) |
||||||
Parameters |
|
||||||
Returns |
PGraphics or void |
||||||
Related |
- 本文固定链接: http://iprocessing.cn/2017/08/02/beginrecord开始记录/
- 转载请注明: 卡萨布兰卡 于 Processing编程艺术 发表