Opens a new file and all subsequent drawing functions are echoed to this file as well as the display window.
1 2 3 4 5 6 7 8 9 10 11 12
def setup(): py5.size(400, 400) py5.begin_record(py5.PDF, "everything.pdf") def draw(): py5.ellipse(py5.mouse_x, py5.mouse_y, 10, 10) def mouse_pressed(): py5.end_record() py5.exit_sketch()
Opens a new file and all subsequent drawing functions are echoed to this file as well as the display window. The
begin_record() function requires two parameters, the first is the renderer and the second is the file name. This function is always used with end_record() to stop the recording process and close the file.
begin_record() will only pick up any settings that happen after it has been called. For instance, if you call text_font() before
begin_record(), then that font will not be set for the file that you’re recording to.
begin_record() works only with the
Underlying Java method: beginRecord
begin_record(recorder: Py5Graphics, /) -> None begin_record(renderer: str, filename: str, /) -> Py5Graphics
filename: str - filename for output
recorder: Py5Graphics - Py5Graphics object to record drawing commands to
renderer: str - PDF or SVG
Updated on September 11, 2021 16:51:34pm UTC