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
@ -4477,10 +4477,7 @@ class InkAnnotation extends MarkupAnnotation {
|
|||||||
bs.set("W", thickness);
|
bs.set("W", thickness);
|
||||||
|
|
||||||
// Color.
|
// Color.
|
||||||
ink.set(
|
ink.set("C", getPdfColorArray(color));
|
||||||
"C",
|
|
||||||
Array.from(color, c => c / 255)
|
|
||||||
);
|
|
||||||
|
|
||||||
// Opacity.
|
// Opacity.
|
||||||
ink.set("CA", opacity);
|
ink.set("CA", opacity);
|
||||||
@ -4694,10 +4691,7 @@ class HighlightAnnotation extends MarkupAnnotation {
|
|||||||
highlight.set("QuadPoints", quadPoints);
|
highlight.set("QuadPoints", quadPoints);
|
||||||
|
|
||||||
// Color.
|
// Color.
|
||||||
highlight.set(
|
highlight.set("C", getPdfColorArray(color));
|
||||||
"C",
|
|
||||||
Array.from(color, c => c / 255)
|
|
||||||
);
|
|
||||||
|
|
||||||
// Opacity.
|
// Opacity.
|
||||||
highlight.set("CA", opacity);
|
highlight.set("CA", opacity);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user