toImageSync abstract method
Synchronously creates a handle to an image from this scene.
The returned image will be
width pixels wide and
height pixels high.
The picture is rasterized within the 0 (left), 0 (top),
height (bottom) bounds. Content outside these bounds is clipped.
The image object is created and returned synchronously, but is rasterized asynchronously. If the rasterization fails, an exception will be thrown when the image is drawn to a Canvas.
If a GPU context is available, this image will be created as GPU resident and not copied back to the host. This means the image will be more efficient to draw.
If no GPU context is available, the image will be rasterized on the CPU.
Image toImageSync(int width, int height);