Handles screen dumps.
More...
#include <ScreenShotter.h>
List of all members.
Classes |
struct | NoAction |
Public Types |
typedef std::vector< size_t > | FrameList |
Public Member Functions |
| ScreenShotter (const std::string &fileName, int quality=100) |
| Create a ScreenShotter with output type selected from filename.
|
| ScreenShotter (const std::string &fileName, FileType f, int quality=100) |
| Create a ScreenShotter, specifying the output type.
|
| ~ScreenShotter () |
void | now () |
| Take a screenshot at the next possible moment.
|
void | lastFrame () |
| Take a screenshot when the last frame is reached.
|
void | last (const Renderer &r) const |
| To be called on the last frame before exit.
|
template<typename Action > |
void | last (const Renderer &r, Action *t=0) const |
| To be called on the last frame before exit.
|
void | screenShot (const Renderer &r, size_t frameAdvance) |
| Takes a screenshot if required.
|
template<typename Action > |
void | screenShot (const Renderer &r, size_t frameAdvance, Action *t=0) |
| Takes a screenshot if required.
|
void | setFrames (const FrameList &frames) |
| Request a list of frames to be rendered to image files.
|
Detailed Description
Handles screen dumps.
Member Typedef Documentation
Constructor & Destructor Documentation
gnash::ScreenShotter::ScreenShotter |
( |
const std::string & |
fileName, |
|
|
int |
quality = 100 | |
|
) |
| | |
gnash::ScreenShotter::ScreenShotter |
( |
const std::string & |
fileName, |
|
|
FileType |
f, |
|
|
int |
quality = 100 | |
|
) |
| | |
gnash::ScreenShotter::~ScreenShotter |
( |
|
) |
|
Member Function Documentation
void gnash::ScreenShotter::last |
( |
const Renderer & |
r |
) |
const [inline] |
To be called on the last frame before exit.
- Parameters:
-
| r | The renderer to use to render the image. Which frame is last depends on the execution path of the SWF, whether the SWF loops, whether a timeout was requested or a maximum number of advances set. Those conditions are not knowable in advance, so the last frame is a special case. |
template<typename Action >
void gnash::ScreenShotter::last |
( |
const Renderer & |
r, |
|
|
Action * |
t = 0 | |
|
) |
| | const [inline] |
To be called on the last frame before exit.
- Template Parameters:
-
| Action | The functor to call only when a screenshot is due. |
- Parameters:
-
| r | The renderer to use to render the image. Which frame is last depends on the execution path of the SWF, whether the SWF loops, whether a timeout was requested or a maximum number of advances set. Those conditions are not knowable in advance, so the last frame is a special case. |
References gnash::key::t.
void gnash::ScreenShotter::lastFrame |
( |
|
) |
[inline] |
Take a screenshot when the last frame is reached.
void gnash::ScreenShotter::now |
( |
|
) |
[inline] |
Take a screenshot at the next possible moment.
void gnash::ScreenShotter::screenShot |
( |
const Renderer & |
r, |
|
|
size_t |
frameAdvance | |
|
) |
| | [inline] |
Takes a screenshot if required.
Called on each advance.
- Parameters:
-
| frameAdvance | used to check whether a screenshot is required as well as to construct the filename. |
| r | The renderer to use to render the image. |
template<typename Action >
void gnash::ScreenShotter::screenShot |
( |
const Renderer & |
r, |
|
|
size_t |
frameAdvance, |
|
|
Action * |
t = 0 | |
|
) |
| | [inline] |
Takes a screenshot if required.
Called on each advance, invoking a functor before any screenshot is taken.
- Template Parameters:
-
| Action | The functor to call only when a screenshot is due. |
- Parameters:
-
| frameAdvance | used to check whether a screenshot is required as well as to construct the filename. |
| r | The renderer to use to render the image. |
References gnash::key::t.
void gnash::ScreenShotter::setFrames |
( |
const FrameList & |
frames |
) |
|
Request a list of frames to be rendered to image files.
The documentation for this class was generated from the following files: