CrystalSpace

Public API Reference

CS::UberScreenshotMaker Class Reference

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

#include <cstool/uberscreenshot.h>

List of all members.

Public Member Functions

csPtr< iImageShoot ()
 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< iImagePostProcessImage (csImageMemory *img)
 Post-process the final image (e.g.
void Setup (iCamera *camera, iEngine *engine, iGraphics3D *g3d)
 Setup the shotView member.
virtual csRef< iImageShootTile (uint tileLeft, uint tileTop, uint tileRight, uint tileBottom)
 Shoot the image for a single tile.
virtual csRef< iImageTakeScreenshot (uint tileLeft, uint tileTop, uint tileRight, uint tileBottom)
 Take and crop the actual screenshot.

Protected Attributes

csRef< iEngineengine
csRef< iGraphics2Dg2d
csRef< iGraphics3Dg3d
uint screenH
 Height of the framebuffer.
uint screenW
 Width of the framebuffer.
csRef< iViewshotView
 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

Height of the framebuffer.

Definition at line 56 of file uberscreenshot.h.

Width of the framebuffer.

Definition at line 54 of file uberscreenshot.h.

View used to render the tiles.

Definition at line 62 of file uberscreenshot.h.

Height of the uberscreenshot.

Definition at line 52 of file uberscreenshot.h.

Width of the uberscreenshot.

Definition at line 50 of file uberscreenshot.h.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.4.7