Possible to save canvas to an image?

I would like to allow the user to draw some geometry on the canvas and then export it as an image. Is that possible?

Again, I figured it out. The way to do it is by capturing a window::Screenshot and then cropping that to the bounds of the canvas. A little convoluted to do it, because a Screenshot returns a Task that runs asynchronously, but it works.