@R0J0hound
thnx for the reply man, i think i have no choice then
but i have found a solution so is not that bad, thnx again
AddNumberParam("X pos", "The X pos to paste from.");
AddNumberParam("Y pos", "The Y pos to paste from.");
AddNumberParam("Width", "The Width of Section to paste from.");
AddNumberParam("Height", "The Height of Section to paste from.");
AddAction(23, 0, "Paste Section", "Canvas", "Paste Section Coordinate x: {0}, y: {1}, width: {2}, height: {3} onto canvas", "Pastes Section into the canvas.", "PasteSection");
acts.PasteSection = function (x,y,w,h)
{
var ctx=this.ctx;
var buffer = document.getElementById('c2canvas');
var bufferCtx = buffer.getContext("2d");
var bufferTMP = document.createElement('canvas');
var bufferTMPCtx = bufferTMP.getContext("2d");
var myImageData = bufferCtx.getImageData(x, y, w, h);
bufferTMP.width = w;
bufferTMP.height = h;
bufferTMPCtx.putImageData(myImageData, 0, 0);
ctx.drawImage(bufferTMP,0,0,this.width,this.height);
this.runtime.redraw = true;
this.update_tex = true;
};
Who is online |
Users browsing this forum: No registered users and 2 guests |