![]() |
Public API 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, iCamera *camera, iEngine *engine, iGraphics3D *g3d) | |
Initialize for dimensions width and height . | |
UberScreenshotMaker (uint width, uint height, iView *view) | |
Initialize, with camera, engine and g3d taken from view . | |
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. |
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.
Definition at line 46 of file uberscreenshot.h.
CS::UberScreenshotMaker::UberScreenshotMaker | ( | uint | width, |
uint | height, | ||
iCamera * | camera, | ||
iEngine * | engine, | ||
iGraphics3D * | g3d | ||
) |
Initialize for dimensions width
and height
.
CS::UberScreenshotMaker::UberScreenshotMaker | ( | uint | width, |
uint | height, | ||
iView * | view | ||
) |
Initialize, with camera, engine and g3d taken from view
.
virtual CS::UberScreenshotMaker::~UberScreenshotMaker | ( | ) | [inline, virtual] |
Destroy.
Definition at line 106 of file uberscreenshot.h.
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.
Create an uberscreenshot.
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.
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.