[Pkg-javascript-commits] [pdf.js] 133/161: Assign non-zero width/height to all rectangles (issue 4260)
David Prévot
taffit at moszumanska.debian.org
Sat Apr 19 14:16:38 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository pdf.js.
commit 7e7b728b5d7bfd0477a44f70a9afdd9a30cae221
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date: Wed Mar 26 22:29:04 2014 +0100
Assign non-zero width/height to all rectangles (issue 4260)
---
src/display/canvas.js | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/display/canvas.js b/src/display/canvas.js
index bcb8516..5f5d04d 100644
--- a/src/display/canvas.js
+++ b/src/display/canvas.js
@@ -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) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git
More information about the Pkg-javascript-commits
mailing list