tcl/tk only exports the canvas as a PS (Postscript) file. In this function, the magick package is used to read the postscript file and render it to an image file based upon the suffix supplied in the filename argument.

canvas_save(canvas, filename, ps_density = NULL, ...)

Arguments

canvas

a tic_ui 'canvas' element.

filename

where the image should be saved. The image suffix will be used as the format argument to the call to magick::image_write()

ps_density

DPI. Resolution to postscript document. This corresponds to the density argument in magick::image_read(). Default: NULL means to use whatever magick package defaults to.

...

all other arguments passed to magick::image_write()