From 2e6405c333d8daae4e3edaa6b48f5ac5a8d7675b Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Tue, 20 Mar 2018 15:25:57 +0000 Subject: Change ArgbToColorRef() to ArgbToAlphaAndColorRef(). 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 Commit-Queue: dsinclair --- xfa/fxfa/parser/cxfa_stipple.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'xfa/fxfa') 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)); -- cgit v1.2.3