]> git.parisson.com Git - pdf.js.git/commitdiff
Close path in `closeFillStroke` and `closeEOFillStroke`
authorIonuț G. Stan <ionut.g.stan@gmail.com>
Thu, 27 Oct 2011 00:08:11 +0000 (03:08 +0300)
committerIonuț G. Stan <ionut.g.stan@gmail.com>
Thu, 27 Oct 2011 00:08:11 +0000 (03:08 +0300)
See Chapter 4, page 230, Table 4.10 of the PDF specification.

pdf.js

diff --git a/pdf.js b/pdf.js
index 05a21538d9a62008cd96b9b8e4bd1030a5a4badb..43df4a16884b9ff48dbe2bb7d23a080abd8d7e92 100644 (file)
--- a/pdf.js
+++ b/pdf.js
@@ -5643,10 +5643,12 @@ var CanvasGraphics = (function canvasGraphics() {
       this.restoreFillRule(savedFillRule);
     },
     closeFillStroke: function canvasGraphicsCloseFillStroke() {
-      return this.fillStroke();
+      this.closePath();
+      this.fillStroke();
     },
     closeEOFillStroke: function canvasGraphicsCloseEOFillStroke() {
       var savedFillRule = this.setEOFillRule();
+      this.closePath();
       this.fillStroke();
       this.restoreFillRule(savedFillRule);
     },