summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpvt_generateap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfdoc/cpvt_generateap.cpp')
-rw-r--r--core/fpdfdoc/cpvt_generateap.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/fpdfdoc/cpvt_generateap.cpp b/core/fpdfdoc/cpvt_generateap.cpp
index 56b6612717..13ef506158 100644
--- a/core/fpdfdoc/cpvt_generateap.cpp
+++ b/core/fpdfdoc/cpvt_generateap.cpp
@@ -538,8 +538,11 @@ bool CPVT_GenerateAP::GenerateHighlightAP(CPDF_Document* pDoc,
CPDF_Dictionary* pGSDict = new CPDF_Dictionary;
pGSDict->SetAtString("Type", "ExtGState");
- pGSDict->SetAtNumber("ca", 1);
- pGSDict->SetAtNumber("CA", 1);
+
+ FX_FLOAT fOpacity =
+ pAnnotDict->KeyExist("CA") ? pAnnotDict->GetNumberBy("CA") : 1;
+ pGSDict->SetAtNumber("ca", fOpacity);
+ pGSDict->SetAtNumber("CA", fOpacity);
pGSDict->SetAtBoolean("AIS", false);
pGSDict->SetAtString("BM", "Multiply");