mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +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:
parent
ac4a5c3ace
commit
e22bc483a5
5 changed files with 124 additions and 52 deletions
|
@ -1136,12 +1136,12 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
|||
|
||||
parseColorSpace({ cs, resources, localColorSpaceCache }) {
|
||||
return new Promise(resolve => {
|
||||
const parsedColorSpace = ColorSpace.parse(
|
||||
const parsedColorSpace = ColorSpace.parse({
|
||||
cs,
|
||||
this.xref,
|
||||
xref: this.xref,
|
||||
resources,
|
||||
this.pdfFunctionFactory
|
||||
);
|
||||
pdfFunctionFactory: this.pdfFunctionFactory,
|
||||
});
|
||||
|
||||
const csName = cs instanceof Name ? cs.name : null;
|
||||
if (csName) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue