Drag[en]gine Script Module DragonScript
1.23
|
Capture canvas. More...
Public Member Functions | |
Constructors | |
CaptureCanvas | new () |
Create capture canvas. More... | |
Management | |
CanvasView | getCanvasView () |
Canvas view to capture. More... | |
void | setCanvasView (CanvasView canvasView) |
Set canvas view to capture. More... | |
Image | getImage () |
Image to capture canvas view into. More... | |
void | setImage (int width, int height, int componentCount, int bitCount) |
Set image to capture canvas view into. More... | |
void | dropImage () |
Drop image if set. More... | |
bool | getCapture () |
Capture in progress. More... | |
void | setCapture (bool capture) |
Set if capture is in progress. More... | |
bool | equals (Object other) |
Capture canvas is equal to another object. More... | |
int | hashCode () |
Hash code for use as dictionary keys. More... | |
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 GraphicSystem.renderWindows() call or at the end of the current GraphicSystem.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:
void Dragengine.Scenery.CaptureCanvas.dropImage | ( | ) |
Drop image if set.
bool Dragengine.Scenery.CaptureCanvas.equals | ( | Object | other | ) |
Capture canvas is equal to another object.
Implements Object.equals(Object).
CanvasView Dragengine.Scenery.CaptureCanvas.getCanvasView | ( | ) |
Canvas view to capture.
bool Dragengine.Scenery.CaptureCanvas.getCapture | ( | ) |
Capture in progress.
Image Dragengine.Scenery.CaptureCanvas.getImage | ( | ) |
Image to capture canvas view into.
int Dragengine.Scenery.CaptureCanvas.hashCode | ( | ) |
Hash code for use as dictionary keys.
Implements Object.hashCode().
CaptureCanvas Dragengine.Scenery.CaptureCanvas.new | ( | ) |
Create capture canvas.
void Dragengine.Scenery.CaptureCanvas.setCanvasView | ( | CanvasView | canvasView | ) |
Set canvas view to capture.
EInvalidParam | canvasView is not of type Canvas.VIEW. |
void Dragengine.Scenery.CaptureCanvas.setCapture | ( | bool | capture | ) |
Set if capture is in progress.
void Dragengine.Scenery.CaptureCanvas.setImage | ( | int | width, |
int | height, | ||
int | componentCount, | ||
int | bitCount | ||
) |
Set image to capture canvas view into.
Creates a new image with the requested parameters.
EInvalidParam | width is less than 1. |
EInvalidParam | height is less than 1. |
EInvalidParam | componentCount is not 1, 2, 3 or 4. |
EInvalidParam | bitCount is not 8 or 24. |