Stub implementation of layer/buffer support (initial compat for new version of protocol)

This commit is contained in:
Michael Jumper
2011-02-12 01:35:32 -08:00
parent 56baa32ec7
commit 3d3aad76c9
2 changed files with 51 additions and 55 deletions

View File

@@ -97,21 +97,11 @@ function Layer(width, height) {
};
display.copyRect = function(srcx, srcy, w, h, x, y) {
display.copyRect = function(srcLayer, srcx, srcy, w, h, x, y) {
var updateId = currentUpdate++;
setUpdate(updateId, function() {
displayContext.drawImage(display, srcx, srcy, w, h, x, y, w, h);
});
};
display.drawRect = function(x, y, w, h, color) {
var updateId = currentUpdate++;
setUpdate(updateId, function() {
displayContext.fillStyle = color;
displayContext.fillRect(x, y, w, h);
displayContext.drawImage(srcLayer, srcx, srcy, w, h, x, y, w, h);
});
};