Drawing Canvas APIs

The built-in Drawing canvas plugin exposes the following APIs.

Drawing canvas instance APIs

async GetImagePixelData()
Takes a snapshot of the drawing canvas pixel state on the GPU, and reads it back to the CPU asynchronously. Resolves with an ImageData representing the pixel data. Note this uses unpremultiplied alpha, whereas the surface on the GPU is premultiplied, so technically this is lossy.
Addon SDK Manual 2019-08-22