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/fx_dib.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'core/fxge/fx_dib.h') diff --git a/core/fxge/fx_dib.h b/core/fxge/fx_dib.h index 17c7c8fd0a..fa38573df8 100644 --- a/core/fxge/fx_dib.h +++ b/core/fxge/fx_dib.h @@ -7,6 +7,9 @@ #ifndef CORE_FXGE_FX_DIB_H_ #define CORE_FXGE_FX_DIB_H_ +#include +#include + #include "core/fxcrt/fx_coordinates.h" enum FXDIB_Format { @@ -80,8 +83,10 @@ inline FX_CMYK CmykEncode(int c, int m, int y, int k) { return (c << 24) | (m << 16) | (y << 8) | k; } -void ArgbDecode(FX_ARGB argb, int& a, int& r, int& g, int& b); -void ArgbDecode(FX_ARGB argb, int& a, FX_COLORREF& rgb); +// Returns tuple a, r, g, b +std::tuple ArgbDecode(FX_ARGB argb); +// Returns pair a, rgb +std::pair ArgbToColorRef(FX_ARGB argb); inline FX_ARGB ArgbEncode(int a, int r, int g, int b) { return (a << 24) | (r << 16) | (g << 8) | b; } -- cgit v1.2.3