Creates a hidden window, calls the supplied drawing function
on a black background, and returns the captured framebuffer as an
image object. The image auto-displays in knitr documents
(like ggplot2 plots) and can be saved with export_image().
Value
An image object. On HiDPI displays the framebuffer is captured at
full pixel density (e.g., 1280x960 for a 640x480 window at 2x scale);
knitr still displays it at width x height.
Examples
if (FALSE) {
raylibr_screenshot(function() {
draw_circle(200L, 150L, 80.0, "yellow")
})
}
