summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-03-20 15:25:57 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-03-20 15:25:57 +0000
commit2e6405c333d8daae4e3edaa6b48f5ac5a8d7675b (patch)
treedf8f6a28b695c34407b3bbe28220584f421afc0e /xfa/fxfa/parser
parentb3a5240832fce3f0b706c16070a1e69c2c1edb86 (diff)
downloadpdfium-2e6405c333d8daae4e3edaa6b48f5ac5a8d7675b.tar.xz
Change ArgbToColorRef() to ArgbToAlphaAndColorRef().chromium/3377
Since that is what it really returns. Add a replacement ArgbToColorRef() that only returns a FX_COLORREF, and remove a duplicate implementation. Then update callers and only use ArgbToAlphaAndColorRef() where appropriate. Also update comments to explain what FX_COLORREF is. Change-Id: I5ed3d71683898dc2b3a66395dea0ec2562c14a68 Reviewed-on: https://pdfium-review.googlesource.com/28575 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r--xfa/fxfa/parser/cxfa_stipple.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/xfa/fxfa/parser/cxfa_stipple.cpp b/xfa/fxfa/parser/cxfa_stipple.cpp
index 6f15badac9..2c36e11353 100644
--- a/xfa/fxfa/parser/cxfa_stipple.cpp
+++ b/xfa/fxfa/parser/cxfa_stipple.cpp
@@ -61,10 +61,10 @@ void CXFA_Stipple::Draw(CXFA_Graphics* pGS,
CXFA_Color* pColor = GetColorIfExists();
FX_ARGB crColor = pColor ? pColor->GetValue() : CXFA_Color::kBlackColor;
- int32_t a;
- FX_COLORREF bgr;
- std::tie(a, bgr) = ArgbToColorRef(crColor);
- FX_ARGB cr = ArgbEncode(iRate * a / 100, bgr);
+ int32_t alpha;
+ FX_COLORREF colorref;
+ std::tie(alpha, colorref) = ArgbToAlphaAndColorRef(crColor);
+ FX_ARGB cr = ArgbEncode(iRate * alpha / 100, colorref);
pGS->SaveGraphState();
pGS->SetFillColor(CXFA_GEColor(cr));