Stub implementation of layer/buffer support (initial compat for new version of protocol)
This commit is contained in:
1 parent
56baa32ec7
commit
3d3aad76c9
2 files changed
+51
-55
No files matched your search
@@ -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);
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user