Drag[en]gine Game Engine  1.21
deCaptureCanvas Class Reference

Capture canvas. More...

#include <deCaptureCanvas.h>

Inheritance diagram for deCaptureCanvas:
deResource deObject

Public Types

typedef deTObjectReference< deCaptureCanvasRef
 Type holding strong reference. More...
 
- Public Types inherited from deResource
typedef deTObjectReference< deResourceRef
 Type holding strong reference. More...
 
- Public Types inherited from deObject
typedef deTObjectReference< deObjectRef
 Type holding strong reference. More...
 

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.

Member Typedef Documentation

◆ Ref

Type holding strong reference.

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.

◆ GetCapture()

bool deCaptureCanvas::GetCapture ( ) const
inline

Capture in progress.

◆ GetImage()

deImage* deCaptureCanvas::GetImage ( ) const
inline

Image to capture canvas view into.

◆ GetPeerGraphic()

deBaseGraphicCaptureCanvas* deCaptureCanvas::GetPeerGraphic ( ) const
inline

Graphic system peer object or NULL if not set.

◆ SetCanvasView()

void deCaptureCanvas::SetCanvasView ( deCanvasView canvasView)

Set canvas view to capture.

◆ SetCapture()

void deCaptureCanvas::SetCapture ( bool  capture)

Set if capture is in progress.

◆ SetImage()

void deCaptureCanvas::SetImage ( deImage image)

Set image to capture canvas view into.

◆ SetPeerGraphic()

void deCaptureCanvas::SetPeerGraphic ( deBaseGraphicCaptureCanvas peer)

Set graphic system peer object or NULL if not set.


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