diff --git a/src/display/canvas.js b/src/display/canvas.js index 024f6b945..e7fce69b0 100644 --- a/src/display/canvas.js +++ b/src/display/canvas.js @@ -2301,7 +2301,6 @@ class CanvasGraphics { getColorN_Pattern(IR) { let pattern; if (IR[0] === "TilingPattern") { - const color = IR[1]; const baseTransform = this.baseTransform || getCurrentTransform(this.ctx); const canvasGraphicsFactory = { createCanvasGraphics: ctx => @@ -2319,7 +2318,6 @@ class CanvasGraphics { }; pattern = new TilingPattern( IR, - color, this.ctx, canvasGraphicsFactory, baseTransform diff --git a/src/display/pattern_helper.js b/src/display/pattern_helper.js index 20ed4c57a..792b5bc36 100644 --- a/src/display/pattern_helper.js +++ b/src/display/pattern_helper.js @@ -462,7 +462,8 @@ class TilingPattern { // 10in @ 300dpi shall be enough. static MAX_PATTERN_SIZE = 3000; - constructor(IR, color, ctx, canvasGraphicsFactory, baseTransform) { + constructor(IR, ctx, canvasGraphicsFactory, baseTransform) { + this.color = IR[1]; this.operatorList = IR[2]; this.matrix = IR[3]; this.bbox = IR[4]; @@ -470,7 +471,6 @@ class TilingPattern { this.ystep = IR[6]; this.paintType = IR[7]; this.tilingType = IR[8]; - this.color = color; this.ctx = ctx; this.canvasGraphicsFactory = canvasGraphicsFactory; this.baseTransform = baseTransform;