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:
parent
ac4a5c3ace
commit
e22bc483a5
5 changed files with 124 additions and 52 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue