Permalink
Browse files

Fix flipgridx operation

  • Loading branch information...
1 parent 5411bd6 commit fa5a1308839398dd2dff6c5f01185020f134a6e7 Blixt committed Mar 2, 2014
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/assetsmanager.js
View
@@ -211,10 +211,12 @@ AssetsManager.prototype.getImage = function (path) {
}
if (flipEveryX) {
+ context.globalCompositeOperation = 'copy';
context.scale(-1, 1);
for (var x = 0; x < image.width; x += flipEveryX) {
context.drawImage(canvas, x, 0, flipEveryX, image.height, -(x + flipEveryX), 0, flipEveryX, image.height);
}
+ context.globalCompositeOperation = 'source-over';
context.scale(1, 1);
}

0 comments on commit fa5a130

Please sign in to comment.