kivy/kivy — pull request #1660 by inclement (2013-11-30 16:01:31+00:00)
Title: Added save_image method to save a picture of a widget

The method works by rendering the widget to an Fbo and saving its texture.

I made a couple of other changes to let it work properly:

- Added an `index` method to instructions, so that the widget canvas index can be saved and replaced later.
- Changed the texture pixels property to always vertically flip the texture. TextureRegion already does this, and I couldn't see any reason Texture shouldn't do it anyway.