Skip to content

Instantly share code, notes, and snippets.

@jviereck
Created January 4, 2010 21:49
Show Gist options
  • Save jviereck/268898 to your computer and use it in GitHub Desktop.
Save jviereck/268898 to your computer and use it in GitHub Desktop.
translateRegion: function(x, y, w, h, newX, newY) {
var context = this.get('canvasContext2D');
data = context.getImageData(x, y, w, h);
context.putImageData(data, newX, newY);
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment