Skip to main content

canvas_exports

Function canvas_exports 

Source
pub fn canvas_exports() -> CanvasExports
Expand description

Canvas export (docs/canvas.md “Exporting”): render a recorded Drawing to a bitmap or a PDF through the toolkit’s own painter. canvas_exports() says which of the two this target offers; the PDF writer is native on AppKit, UIKit, GTK, Qt and Android only. What this toolkit can export a canvas drawing to.

Safe to call anywhere, including from a context menu that is built while the tree is busy summoning it: the answer is read once per installed tree and kept. Before a tree is installed, and in the rare case its first read lands inside a borrow, everything answers false.