toImage method
Creates an image from this picture.
The picture is rasterized using the number of pixels specified by the given width and height.
Although the image is returned synchronously, the picture is actually rasterized the first time the image is drawn and then cached.
Implementation
Image toImage(int width, int height) native 'Picture_toImage';