1
0
Fork 0
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:
Tim van der Meij 2025-03-30 11:49:11 +02:00 committed by GitHub
commit 9d237b9f96
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 4 deletions

View file

@ -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

View file

@ -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;