I need to take a partial screenshot, lets say from position 10,10 with 200 pixel width and 100 pixels height.
I tried to read from the canvas (this._iRuntime._canvas), but its just black.
The snapshotfunction only delivers a full screen shot, already as encoded url.
In any other html5 framework that works, but not in Construct3.
Thats what i Do:
screenshot(this._iRuntime._canvas, 10, 10, 200, 100);
function screenshot (_canvas, _x, _y, _sx, _sy)
var SaveCan = document.createElement('canvas');
var SaveCtx = SaveCan.getContext('2d');
SaveCtx.fillStyle = "rgb(100,100,200)"; //Make sure it is not black
var canvasData = SaveCan.toDataURL("image/jpg");
-> POST to a php script
Any help welcome