mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 18:25:37 +02:00
Assign non-zero width/height to all rectangles (issue 4260)
This commit is contained in:
parent
1d0286f6a1
commit
7e7b728b5d
1 changed files with 7 additions and 0 deletions
|
@ -975,6 +975,13 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
|
||||||
this.ctx.closePath();
|
this.ctx.closePath();
|
||||||
},
|
},
|
||||||
rectangle: function CanvasGraphics_rectangle(x, y, width, height) {
|
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);
|
this.ctx.rect(x, y, width, height);
|
||||||
},
|
},
|
||||||
stroke: function CanvasGraphics_stroke(consumePath) {
|
stroke: function CanvasGraphics_stroke(consumePath) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue