canvas(win, left, top, width, height, canvas, flags, dX, dY, readback)¶
Draw a rectangle off the framebuffer.
win (DOMWindow) – The DOM window used for the framebuffer, and providing the interfaces for creating an HTMLCanvasElement.
left (number) – The left, X axis offset of the rectangle.
top (number) – The top, Y axis offset of the rectangle.
width (number) – The width dimension of the rectangle to paint.
height (number) – The height dimension of the rectangle to paint.
canvas (HTMLCanvasElement) – Optional canvas to reuse for the screenshot.
flags (number) – Optional integer representing flags to pass to drawWindow; these are defined on CanvasRenderingContext2D.
dX (number) – Horizontal offset between the browser window and content area. Defaults to 0.
dY (number) – Vertical offset between the browser window and content area. Defaults to 0.
readback (boolean) – If true, read back a snapshot of the pixel data currently in the compositor/window. Defaults to false.
HTMLCanvasElement – The canvas on which the selection from the window’s framebuffer has been painted on.