I need save a Widget where I have draw something to a Image file, how can I do it?

Thanks