diff options
author | jaepark <jaepark@google.com> | 2016-08-01 18:07:21 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-01 18:07:21 -0700 |
commit | 2d7ab183976259dd9f428bfe3e10966fdd3e5f65 (patch) | |
tree | d1b8d00c7b351c2656598eedd67d4251d018f53f | |
parent | ca97a8ee99cad1ddb6a69e14cc7a501b3e8092a4 (diff) | |
download | pdfium-2d7ab183976259dd9f428bfe3e10966fdd3e5f65.tar.xz |
Support PDF highlight annotation with opacity.
BUG=62625
Review-Url: https://codereview.chromium.org/2202063002
-rw-r--r-- | DEPS | 2 | ||||
-rw-r--r-- | core/fpdfdoc/cpvt_generateap.cpp | 7 |
2 files changed, 6 insertions, 3 deletions
@@ -14,7 +14,7 @@ vars = { 'gmock_revision': '29763965ab52f24565299976b936d1265cb6a271', 'gtest_revision': '8245545b6dc9c4703e6496d1efd19e975ad2b038', 'icu_revision': 'a5f86adbb0a58d04c035a5d1228747b1823cd485', - 'pdfium_tests_revision': '62d61d99f65f4a9ce266ca0ecf74bc098d397fd3', + 'pdfium_tests_revision': 'b63db0698bd3cac932807eb552e565b89dd2df9d', 'skia_revision': '7d46f4af7dc759002537a172af121f2bfe200981', 'tools_memory_revision': '427f10475e1a8d72424c29d00bf689122b738e5d', 'trace_event_revision': '54b8455be9505c2cb0cf5c26bb86739c236471aa', 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"); |