Drag[en]gine Game Engine  1.0
deCaptureCanvas Class Reference

Capture canvas. More...

#include <deCaptureCanvas.h>

Inheritance diagram for deCaptureCanvas:
deResource deObject

Public Member Functions

Management
deCanvasViewGetCanvasView () const
 Canvas view to capture. More...
 
void SetCanvasView (deCanvasView *canvasView)
 Set canvas view to capture. More...
 
deImageGetImage () const
 Image to capture canvas view into. More...
 
void SetImage (deImage *image)
 Set image to capture canvas view into. More...
 
bool GetCapture () const
 Capture in progress. More...
 
void SetCapture (bool capture)
 Set if capture is in progress. More...
 
System Peers
deBaseGraphicCaptureCanvasGetPeerGraphic () const
 Graphic system peer object or NULL if not set. More...
 
void SetPeerGraphic (deBaseGraphicCaptureCanvas *peer)
 Set graphic system peer object or NULL if not set. More...
 
- Public Member Functions inherited from deResource
deResourceManagerGetResourceManager () const
 Resource manager or NULL if resource is leaking. More...
 
deEngineGetEngine () const
 Game engine object from resource manager. More...
 
deResourceGetLLManagerPrev () const
 Previous resource in the resource manager linked list. More...
 
void SetLLManagerPrev (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
deResourceGetLLManagerNext () const
 Next resource in the resource manager linked list. More...
 
void SetLLManagerNext (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
void MarkLeaking ()
 Marks the resource leaking. More...
 
 deResource (deResourceManager *resourceManager)
 Create resource. More...
 
- Public Member Functions inherited from deObject
int GetRefCount () const
 Reference count. More...
 
void AddReference ()
 Add reference increasing reference count by 1. More...
 
void FreeReference ()
 Decrease reference count by one and delete object if count reaches 0. More...
 
 deObject ()
 Create object with reference count of 1. More...
 

Constructors and Destructors

 deCaptureCanvas (deCaptureCanvasManager *manager)
 Create capture canvas. More...
 
virtual ~deCaptureCanvas ()
 Clean up capture canvas. More...
 

Additional Inherited Members

- Protected Member Functions inherited from deResource
virtual ~deResource ()
 Clean up resource. More...
 
- Protected Member Functions inherited from deObject
virtual ~deObject ()
 Clean up object. More...
 

Detailed Description

Capture canvas.

Capture canvas allows to capture the rendering result of a canvas view into an deImage resource. Capturing is done by the graphic module during the next frame rendering. During the next deGraphicSystem::RenderWindows() call or at the end of the current deGraphicSystem::RenderWindows() call the result is stored back into the capture canvas. Whichever is the case depends on the rendering method of the graphic module. You know when the result is ready capture is set to false. The image resource is created by the caller and allows to request the result in a specific size and format. To do a successful capturing of a render view you have to do the following:

  • set image to a valid deImage object.
  • set capture to true.
  • during the next one or two deGraphicSystem::RenderWindows() calls check if capture is false. You can capture the canvas view of a render window or any other canvas view similar to a deCanvasCanvas.
    Author
    Pl├╝ss Roland
    Version
    1.0
    Date
    2015

Constructor & Destructor Documentation

◆ deCaptureCanvas()

deCaptureCanvas::deCaptureCanvas ( deCaptureCanvasManager manager)

Create capture canvas.

◆ ~deCaptureCanvas()

virtual deCaptureCanvas::~deCaptureCanvas ( )
protectedvirtual

Clean up capture canvas.

Note
Subclasses should set their destructor protected too to avoid users accidently deleting a reference counted object through the object pointer. Only FreeReference() is allowed to delete the object.

Member Function Documentation

◆ GetCanvasView()

deCanvasView* deCaptureCanvas::GetCanvasView ( ) const
inline

Canvas view to capture.

References SetCanvasView().

◆ GetCapture()

bool deCaptureCanvas::GetCapture ( ) const
inline

Capture in progress.

References SetCapture().

◆ GetImage()

deImage* deCaptureCanvas::GetImage ( ) const
inline

Image to capture canvas view into.

References SetImage().

◆ GetPeerGraphic()

deBaseGraphicCaptureCanvas* deCaptureCanvas::GetPeerGraphic ( ) const
inline

Graphic system peer object or NULL if not set.

References SetPeerGraphic().

◆ SetCanvasView()

void deCaptureCanvas::SetCanvasView ( deCanvasView canvasView)

Set canvas view to capture.

Referenced by GetCanvasView().

◆ SetCapture()

void deCaptureCanvas::SetCapture ( bool  capture)

Set if capture is in progress.

Referenced by GetCapture().

◆ SetImage()

void deCaptureCanvas::SetImage ( deImage image)

Set image to capture canvas view into.

Referenced by GetImage().

◆ SetPeerGraphic()

void deCaptureCanvas::SetPeerGraphic ( deBaseGraphicCaptureCanvas peer)

Set graphic system peer object or NULL if not set.

Referenced by GetPeerGraphic().


The documentation for this class was generated from the following file: