summaryrefslogtreecommitdiff
path: root/public/fpdf_edit.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-06-09 11:30:25 -0700
committerTom Sepez <tsepez@chromium.org>2015-06-09 11:30:25 -0700
commitbb17868d736f698d5217c30d52c5bbfed62c5936 (patch)
tree9d4d3e2538a81e6241d4992570bc3f3c1af71d28 /public/fpdf_edit.h
parentbf6c2a4873f8cc12ad910fb904218a78087a3735 (diff)
downloadpdfium-bb17868d736f698d5217c30d52c5bbfed62c5936.tar.xz
Use stdint.h types throughout PDFium.
It's redundant nowadays to provide our own equivalents, now that this is done for us by the system header. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1177483002
Diffstat (limited to 'public/fpdf_edit.h')
-rw-r--r--public/fpdf_edit.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/public/fpdf_edit.h b/public/fpdf_edit.h
index d97fbdb5cb..4d5191caa6 100644
--- a/public/fpdf_edit.h
+++ b/public/fpdf_edit.h
@@ -7,16 +7,18 @@
#ifndef PUBLIC_FPDF_EDIT_H_
#define PUBLIC_FPDF_EDIT_H_
+#include <stdint.h>
+
#include "fpdfview.h"
// Define all types used in the SDK. Note they can be simply regarded as opaque pointers
// or long integer numbers.
-#define FPDF_ARGB(a,r,g,b) ((((FX_DWORD)(((FX_BYTE)(b)|((FX_WORD)((FX_BYTE)(g))<<8))|(((FX_DWORD)(FX_BYTE)(r))<<16)))) | (((FX_DWORD)(FX_BYTE)(a))<<24))
-#define FPDF_GetBValue(argb) ((FX_BYTE)(argb))
-#define FPDF_GetGValue(argb) ((FX_BYTE)(((FX_WORD)(argb)) >> 8))
-#define FPDF_GetRValue(argb) ((FX_BYTE)((argb)>>16))
-#define FPDF_GetAValue(argb) ((FX_BYTE)((argb)>>24))
+#define FPDF_ARGB(a,r,g,b) ((((uint32_t)(((uint8_t)(b)|((FX_WORD)((uint8_t)(g))<<8))|(((FX_DWORD)(uint8_t)(r))<<16)))) | (((FX_DWORD)(uint8_t)(a))<<24))
+#define FPDF_GetBValue(argb) ((uint8_t)(argb))
+#define FPDF_GetGValue(argb) ((uint8_t)(((uint16_t)(argb)) >> 8))
+#define FPDF_GetRValue(argb) ((uint8_t)((argb)>>16))
+#define FPDF_GetAValue(argb) ((uint8_t)((argb)>>24))
#ifdef __cplusplus
extern "C" {