首页 > 文档 > beginRecord()开始记录
2017
08-02

beginRecord()开始记录

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

renderer

String: PDF or SVG

PDF或SVG格式

filename

String: filename for output

 

输出文件名

Returns

PGraphics or void

Related

endRecord()



最后编辑:
作者:卡萨布兰卡
这个作者貌似有点懒,什么都没有留下。

留下一个回复

你的email不会被公开。