mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 06:38:07 +02:00
Merge pull request #19737 from Snuffleupagus/TilingPattern-color-param
Simplify handling of the color-parameter in `TilingPattern` (PR 4824 follow-up)
This commit is contained in:
commit
9d237b9f96
2 changed files with 2 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue