cgcostume/cgsee — pull request #34 by cgcostume (2013-05-12 02:18:49+00:00)
Title: Basic screenshot module 12

The following features are supported:
* capture the current image displayed in the canvas and store to an image file.
* direct capture - press [F10]:
* on first use, save file dialog pops up and asks for file
* on consecutive uses, the file name is incremented by a time tag
* advanced capture - press [Shift+F10]:
* additionally (before save file dialog) an advanced canvas export dialog pops up
* provides presets like multiples of the canvas, or common letter or display formats
* allows to setup user defined image size, via width and height and pixel per inch.
* width and height can be in various units (pixel, points, inches, centimeters, millimeters)
* additional information for target image size in bytes and pixel is displayed and updated on every change
* presets and custom configurations are restored on next advanced use
* consecutive direct captures always use the last advanced configuration and increment the file name
* aspect ratio can be enforced or image can be stretched

architectural notes:
* ```CanvasExporter``` is initiated by the viewer and requires a ```Canvas``` reference for capture calls
* the capture is done in the ```abstractpainter``` and should work for all following painters
* to provide correctly re-sized canvas and main fbo an ```AbstractGLParent``` was introduced
* this allows to let the ```AbstractPainter``` call the ```Canvas``` to resize
* this is important, since having a ```Camera``` in the ```Canvas``` is not possible, since ```Camera``` is in core might contain glm math, which is not intended as an interface to gui right now.

left undone:
* support for alpha channel is optional for now and probably does not work
* image format specific options such as quality in jpg etc. are not available right now

despite the undone features, a basic screenshot module is available and sufficient for now.