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

Take fill-alpha into account with default icons for FileAttachment annotations (issue 16800)

This commit is contained in:
Jonas Jenwald 2023-08-08 11:16:50 +02:00
parent 15c21d7758
commit e2819d0c67
5 changed files with 38 additions and 7 deletions

View file

@ -4652,6 +4652,12 @@ class FileAttachmentAnnotation extends MarkupAnnotation {
const name = dict.get("Name");
this.data.name =
name instanceof Name ? stringToPDFString(name.name) : "PushPin";
const fillAlpha = dict.get("ca");
this.data.fillAlpha =
typeof fillAlpha === "number" && fillAlpha >= 0 && fillAlpha <= 1
? fillAlpha
: null;
}
}