mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #19423 from Snuffleupagus/annotation-more-getPdfColorArray
Use the `getPdfColorArray` helper more in the `src/core/annotation.js` file
This commit is contained in:
commit
01148d35bc
1 changed files with 2 additions and 8 deletions
|
@ -4477,10 +4477,7 @@ class InkAnnotation extends MarkupAnnotation {
|
|||
bs.set("W", thickness);
|
||||
|
||||
// Color.
|
||||
ink.set(
|
||||
"C",
|
||||
Array.from(color, c => c / 255)
|
||||
);
|
||||
ink.set("C", getPdfColorArray(color));
|
||||
|
||||
// Opacity.
|
||||
ink.set("CA", opacity);
|
||||
|
@ -4694,10 +4691,7 @@ class HighlightAnnotation extends MarkupAnnotation {
|
|||
highlight.set("QuadPoints", quadPoints);
|
||||
|
||||
// Color.
|
||||
highlight.set(
|
||||
"C",
|
||||
Array.from(color, c => c / 255)
|
||||
);
|
||||
highlight.set("C", getPdfColorArray(color));
|
||||
|
||||
// Opacity.
|
||||
highlight.set("CA", opacity);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue