CS::UberScreenshotMaker Class Reference
Helper to create "überscreenshots", screenshots with a resolution larger than the current framebuffer resolution. More...
#include <cstool/uberscreenshot.h>
Public Member Functions | |
csPtr< iImage > | Shoot () |
Create an uberscreenshot. | |
UberScreenshotMaker (uint width, uint height, iView *view) | |
Initialize, with camera, engine and g3d taken from view . | |
UberScreenshotMaker (uint width, uint height, iCamera *camera, iEngine *engine, iGraphics3D *g3d) | |
Initialize for dimensions width and height . | |
virtual | ~UberScreenshotMaker () |
Destroy. | |
Protected Member Functions | |
virtual bool | DrawTile3D (uint tileLeft, uint tileTop, uint tileRight, uint tileBottom) |
Draw the view, set up to cover the current tile. | |
virtual csRef< iImage > | PostProcessImage (csImageMemory *img) |
Post-process the final image (e.g. | |
void | Setup (iCamera *camera, iEngine *engine, iGraphics3D *g3d) |
Setup the shotView member. | |
virtual csRef< iImage > | ShootTile (uint tileLeft, uint tileTop, uint tileRight, uint tileBottom) |
Shoot the image for a single tile. | |
virtual csRef< iImage > | TakeScreenshot (uint tileLeft, uint tileTop, uint tileRight, uint tileBottom) |
Take and crop the actual screenshot. | |
Protected Attributes | |
csRef< iEngine > | engine |
csRef< iGraphics2D > | g2d |
csRef< iGraphics3D > | g3d |
uint | screenH |
Height of the framebuffer. | |
uint | screenW |
Width of the framebuffer. | |
csRef< iView > | shotView |
View used to render the tiles. | |
uint | ubershotH |
Height of the uberscreenshot. | |
uint | ubershotW |
Width of the uberscreenshot. |
Detailed Description
Helper to create "überscreenshots", screenshots with a resolution larger than the current framebuffer resolution.It works by splitting up the ubershot into tiles, creating multiple screenshots (one for each tile) and stitching those tiles together into a larger image.
- Remarks:
- Since the ubershot maker bypasses the normal event loop to render the tiles, e.g. GUI elements can't appear on the screenshot. However, you can derive a custom uberscreenshot maker from this class which implements a custom ShootTile() method to handle GUI drawing
Definition at line 46 of file uberscreenshot.h.
Constructor & Destructor Documentation
CS::UberScreenshotMaker::UberScreenshotMaker | ( | uint | width, | |
uint | height, | |||
iCamera * | camera, | |||
iEngine * | engine, | |||
iGraphics3D * | g3d | |||
) |
Initialize for dimensions width
and height
.
Initialize, with camera, engine and g3d taken from view
.
virtual CS::UberScreenshotMaker::~UberScreenshotMaker | ( | ) | [inline, virtual] |
Member Function Documentation
virtual bool CS::UberScreenshotMaker::DrawTile3D | ( | uint | tileLeft, | |
uint | tileTop, | |||
uint | tileRight, | |||
uint | tileBottom | |||
) | [protected, virtual] |
Draw the view, set up to cover the current tile.
virtual csRef<iImage> CS::UberScreenshotMaker::PostProcessImage | ( | csImageMemory * | img | ) | [protected, virtual] |
Post-process the final image (e.g.
add watermark). By default does nothing.
void CS::UberScreenshotMaker::Setup | ( | iCamera * | camera, | |
iEngine * | engine, | |||
iGraphics3D * | g3d | |||
) | [protected] |
Setup the shotView member.
virtual csRef<iImage> CS::UberScreenshotMaker::ShootTile | ( | uint | tileLeft, | |
uint | tileTop, | |||
uint | tileRight, | |||
uint | tileBottom | |||
) | [inline, protected, virtual] |
Shoot the image for a single tile.
The area of the tile on the ubershot is given by the parameters.
Any custom implementations should call DrawTile3D(), do any custom drawing, and finally call TakeScreenshot().
Definition at line 81 of file uberscreenshot.h.
virtual csRef<iImage> CS::UberScreenshotMaker::TakeScreenshot | ( | uint | tileLeft, | |
uint | tileTop, | |||
uint | tileRight, | |||
uint | tileBottom | |||
) | [protected, virtual] |
Take and crop the actual screenshot.
Member Data Documentation
uint CS::UberScreenshotMaker::screenH [protected] |
uint CS::UberScreenshotMaker::screenW [protected] |
csRef<iView> CS::UberScreenshotMaker::shotView [protected] |
uint CS::UberScreenshotMaker::ubershotH [protected] |
uint CS::UberScreenshotMaker::ubershotW [protected] |
The documentation for this class was generated from the following file:
- cstool/uberscreenshot.h
Generated for Crystal Space by doxygen 1.4.7