Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1829)

Unified Diff: core/fpdfdoc/cpvt_generateap.cpp

Issue 2202063002: Support PDF highlight annotation with opacity. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfdoc/cpvt_generateap.cpp
diff --git a/core/fpdfdoc/cpvt_generateap.cpp b/core/fpdfdoc/cpvt_generateap.cpp
index 56b661271702cb5e3f6ad2c75f6ccad1b58d056a..8f68631a7301c7d827a971096a7ce5520a39f15f 100644
--- a/core/fpdfdoc/cpvt_generateap.cpp
+++ b/core/fpdfdoc/cpvt_generateap.cpp
@@ -538,8 +538,10 @@ 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 fCA = pAnnotDict->KeyExist("CA") ? pAnnotDict->GetNumberBy("CA") : 1;
Lei Zhang 2016/08/01 23:50:48 How about naming the variable "fStrokeAlpha" ?
jaepark 2016/08/02 00:21:54 Done. Changed it to fOpacity.
+ pGSDict->SetAtNumber("ca", fCA);
+ pGSDict->SetAtNumber("CA", fCA);
pGSDict->SetAtBoolean("AIS", false);
pGSDict->SetAtString("BM", "Multiply");
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698