Merge pull request #4521 from Snuffleupagus/issue-4260

Assign non-zero width/height to all rectangles (issue 4260)
This commit is contained in:
Yury Delendik 2014-03-31 08:08:39 -05:00
commit 7075032cc8

View File

@ -975,6 +975,13 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
this.ctx.closePath();
},
rectangle: function CanvasGraphics_rectangle(x, y, width, height) {
if (width === 0) {
width = this.getSinglePixelWidth();
}
if (height === 0) {
height = this.getSinglePixelWidth();
}
this.ctx.rect(x, y, width, height);
},
stroke: function CanvasGraphics_stroke(consumePath) {