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< iCamera > | originalCam |
Original camera. | |
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] |
Destroy.
Definition at line 106 of file uberscreenshot.h.
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 83 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
csRef<iCamera> CS::UberScreenshotMaker::originalCam [protected] |
Original camera.
Definition at line 64 of file uberscreenshot.h.
uint CS::UberScreenshotMaker::screenH [protected] |
Height of the framebuffer.
Definition at line 56 of file uberscreenshot.h.
uint CS::UberScreenshotMaker::screenW [protected] |
Width of the framebuffer.
Definition at line 54 of file uberscreenshot.h.
csRef<iView> CS::UberScreenshotMaker::shotView [protected] |
View used to render the tiles.
Definition at line 62 of file uberscreenshot.h.
uint CS::UberScreenshotMaker::ubershotH [protected] |
Height of the uberscreenshot.
Definition at line 52 of file uberscreenshot.h.
uint CS::UberScreenshotMaker::ubershotW [protected] |
Width of the uberscreenshot.
Definition at line 50 of file uberscreenshot.h.
The documentation for this class was generated from the following file:
- cstool/uberscreenshot.h
Generated for Crystal Space 2.0 by doxygen 1.6.1