From ddfc3dcce42ad1dc805f29102f7d056a5809d489 Mon Sep 17 00:00:00 2001 From: Nicolas Pena Date: Thu, 20 Apr 2017 15:29:25 -0400 Subject: Let {Argb,Cmyk}Decode return tuples MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ic4e766d9417f9a9ece5f9e4269d0f96e1e91639b Reviewed-on: https://pdfium-review.googlesource.com/4392 Commit-Queue: Nicolás Peña Reviewed-by: Tom Sepez --- core/fxge/win32/fx_win32_device.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'core/fxge/win32/fx_win32_device.cpp') diff --git a/core/fxge/win32/fx_win32_device.cpp b/core/fxge/win32/fx_win32_device.cpp index 986839ee88..de2f6c4b04 100644 --- a/core/fxge/win32/fx_win32_device.cpp +++ b/core/fxge/win32/fx_win32_device.cpp @@ -137,7 +137,7 @@ HPEN CreatePen(const CFX_GraphStateData* pGraphState, } int a; FX_COLORREF rgb; - ArgbDecode(argb, a, rgb); + std::tie(a, rgb) = ArgbToColorRef(argb); LOGBRUSH lb; lb.lbColor = rgb; lb.lbStyle = BS_SOLID; @@ -160,7 +160,7 @@ HPEN CreatePen(const CFX_GraphStateData* pGraphState, HBRUSH CreateBrush(uint32_t argb) { int a; FX_COLORREF rgb; - ArgbDecode(argb, a, rgb); + std::tie(a, rgb) = ArgbToColorRef(argb); return CreateSolidBrush(rgb); } @@ -1090,7 +1090,7 @@ bool CGdiDeviceDriver::FillRectWithBlend(const FX_RECT* pRect, int alpha; FX_COLORREF rgb; - ArgbDecode(fill_color, alpha, rgb); + std::tie(alpha, rgb) = ArgbToColorRef(fill_color); if (alpha == 0) return true; @@ -1146,7 +1146,7 @@ bool CGdiDeviceDriver::DrawCosmeticLine(float x1, int a; FX_COLORREF rgb; - ArgbDecode(color, a, rgb); + std::tie(a, rgb) = ArgbToColorRef(color); if (a == 0) return true; -- cgit v1.2.3