This commit is contained in:
Huabing.Xu
2016-01-15 15:39:05 +08:00
parent 1ba58e5878
commit b5dffdbed2
2 changed files with 10 additions and 6 deletions
@@ -398,9 +398,11 @@
wrapper.setFillStyle(context.createPattern(image, this._labelTexture._pattern));
context.fillRect(x, y, w, h);
} else {
context.drawImage(image,
sx, sy, sw, sh,
x, y, w, h);
if(sw !== 0 && sh !== 0 && w !== 0 && h !== 0) {
context.drawImage(image,
sx, sy, sw, sh,
x, y, w, h);
}
}
}
cc.g_NumberOfDraws = cc.g_NumberOfDraws + 1;
@@ -109,9 +109,11 @@
wrapper.setFillStyle(context.createPattern(image, this._textureToRender._pattern));
context.fillRect(x, y, w, h);
} else {
context.drawImage(image,
sx, sy, sw, sh,
x, y, w, h);
if(sw !== 0 && sh !== 0 && w !== 0 && h !== 0) {
context.drawImage(image,
sx, sy, sw, sh,
x, y, w, h);
}
}
}