1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 01:58:06 +02:00

Re-factor ColorSpace.parse to take a parameter object, rather than a bunch of (randomly) ordered parameters

Given the number of existing parameters, this will avoid needlessly unwieldy call-sites especially with upcoming changes in later patches.
This commit is contained in:
Jonas Jenwald 2020-06-17 18:17:43 +02:00
parent ac4a5c3ace
commit e22bc483a5
5 changed files with 124 additions and 52 deletions

View file

@ -179,13 +179,12 @@ var PDFImage = (function PDFImageClosure() {
);
}
}
const resources = isInline ? res : null;
this.colorSpace = ColorSpace.parse(
colorSpace,
this.colorSpace = ColorSpace.parse({
cs: colorSpace,
xref,
resources,
pdfFunctionFactory
);
resources: isInline ? res : null,
pdfFunctionFactory,
});
this.numComps = this.colorSpace.numComps;
}