I've modified your plugin to my liking, and was curious if you'd like to include it in your code going forward? Here's what I did:
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");
[/code:oo4tpvca]
In Runtime.js
[code:oo4tpvca] 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;
};[/code:oo4tpvca]
I'm sure there may be a better way of doing this... but this is the method that worked for me. The good thing about this code is, it takes ALL of the layers at the exact point you specify in the C2Canvas. Great for lots of uses, including mine. Works great too. If you're not interested in including it, that's ok... I'll just modify yours every time I need to download it.
Hopefully other people are able to get a use out of this too.