## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# CS::UberScreenshotMaker Class Reference

Helper to create "&uuml;berscreenshots", screenshots with a resolution larger than the current framebuffer resolution. More...

`#include <cstool/uberscreenshot.h>`

List of all members.

## 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 "&uuml;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`.

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 104 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.

csPtr<iImage> CS::UberScreenshotMaker::Shoot | ( |  | ) |

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 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]`

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