summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdfview.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2014-07-08 16:56:13 -0700
committerLei Zhang <thestig@chromium.org>2014-07-08 16:56:13 -0700
commitab99c380bfeb5bf2007c0928f816c737f733250f (patch)
treeb3fd7eda6e8ed8f07674f6a6fba21e82ca83bee7 /fpdfsdk/src/fpdfview.cpp
parent95c018e2d15ecc3a5bd2a9aab18638316a6d3d46 (diff)
downloadpdfium-ab99c380bfeb5bf2007c0928f816c737f733250f.tar.xz
Revert commit 95c018e2d15ecc3a5bd2a9aab18638316a6d3d46
Fixes for re-enabling more MSVC level 4 warnings: pdfium/ edition BUG=81439 TBR=pkasting@chromium.org Review URL: https://codereview.chromium.org/376043003
Diffstat (limited to 'fpdfsdk/src/fpdfview.cpp')
-rw-r--r--fpdfsdk/src/fpdfview.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp
index a9aa9a8ff2..10eaf5d980 100644
--- a/fpdfsdk/src/fpdfview.cpp
+++ b/fpdfsdk/src/fpdfview.cpp
@@ -725,7 +725,8 @@ DLLEXPORT FPDF_BITMAP STDCALL FPDFBitmap_CreateEx(int width, int height, int for
return pBitmap;
}
-DLLEXPORT void STDCALL FPDFBitmap_FillRect(FPDF_BITMAP bitmap, int left, int top, int width, int height, FPDF_DWORD color)
+DLLEXPORT void STDCALL FPDFBitmap_FillRect(FPDF_BITMAP bitmap, int left, int top, int width, int height,
+ int red, int green, int blue, int alpha)
{
if (bitmap == NULL) return;
#ifdef _SKIA_SUPPORT_
@@ -734,9 +735,9 @@ DLLEXPORT void STDCALL FPDFBitmap_FillRect(FPDF_BITMAP bitmap, int left, int top
CFX_FxgeDevice device;
#endif
device.Attach((CFX_DIBitmap*)bitmap);
- if (!((CFX_DIBitmap*)bitmap)->HasAlpha()) color |= 0xFF000000;
+ if (!((CFX_DIBitmap*)bitmap)->HasAlpha()) alpha = 255;
FX_RECT rect(left, top, left+width, top+height);
- device.FillRect(&rect, color);
+ device.FillRect(&rect, FXARGB_MAKE(alpha, red, green, blue));
}
DLLEXPORT void* STDCALL FPDFBitmap_GetBuffer(FPDF_BITMAP bitmap)