Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef PUBLIC_FPDF_EDIT_H_ | 7 #ifndef PUBLIC_FPDF_EDIT_H_ |
| 8 #define PUBLIC_FPDF_EDIT_H_ | 8 #define PUBLIC_FPDF_EDIT_H_ |
| 9 | 9 |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| 11 | 11 |
| 12 #include "fpdfview.h" | 12 #include "fpdfview.h" |
| 13 | 13 |
| 14 // Define all types used in the SDK. Note they can be simply regarded as opaque | 14 // Define all types used in the SDK. Note they can be simply regarded as opaque |
| 15 // pointers | 15 // pointers |
| 16 // or long integer numbers. | 16 // or long integer numbers. |
| 17 | 17 |
| 18 #define FPDF_ARGB(a, r, g, b) \ | 18 #define FPDF_ARGB(a, r, g, b) \ |
| 19 ((((uint32_t)(((uint8_t)(b) | ((FX_WORD)((uint8_t)(g)) << 8)) | \ | 19 ((((uint32_t)(((uint8_t)(b) | ((uint16_t)((uint8_t)(g)) << 8)) | \ |
|
Tom Sepez
2016/03/22 16:55:53
Formatting, also this looks wrong. We want to cas
dsinclair
2016/03/23 00:00:25
Done. You may want to verify my bracketing.
| |
| 20 (((FX_DWORD)(uint8_t)(r)) << 16)))) | \ | 20 (((FX_DWORD)(uint8_t)(r)) << 16)))) | \ |
| 21 (((FX_DWORD)(uint8_t)(a)) << 24)) | 21 (((FX_DWORD)(uint8_t)(a)) << 24)) |
| 22 #define FPDF_GetBValue(argb) ((uint8_t)(argb)) | 22 #define FPDF_GetBValue(argb) ((uint8_t)(argb)) |
| 23 #define FPDF_GetGValue(argb) ((uint8_t)(((uint16_t)(argb)) >> 8)) | 23 #define FPDF_GetGValue(argb) ((uint8_t)(((uint16_t)(argb)) >> 8)) |
| 24 #define FPDF_GetRValue(argb) ((uint8_t)((argb) >> 16)) | 24 #define FPDF_GetRValue(argb) ((uint8_t)((argb) >> 16)) |
| 25 #define FPDF_GetAValue(argb) ((uint8_t)((argb) >> 24)) | 25 #define FPDF_GetAValue(argb) ((uint8_t)((argb) >> 24)) |
| 26 | 26 |
| 27 #ifdef __cplusplus | 27 #ifdef __cplusplus |
| 28 extern "C" { | 28 extern "C" { |
| 29 #endif | 29 #endif |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 298 DLLEXPORT FPDF_BOOL STDCALL FPDFImageObj_SetBitmap(FPDF_PAGE* pages, | 298 DLLEXPORT FPDF_BOOL STDCALL FPDFImageObj_SetBitmap(FPDF_PAGE* pages, |
| 299 int nCount, | 299 int nCount, |
| 300 FPDF_PAGEOBJECT image_object, | 300 FPDF_PAGEOBJECT image_object, |
| 301 FPDF_BITMAP bitmap); | 301 FPDF_BITMAP bitmap); |
| 302 | 302 |
| 303 #ifdef __cplusplus | 303 #ifdef __cplusplus |
| 304 } | 304 } |
| 305 #endif | 305 #endif |
| 306 | 306 |
| 307 #endif // PUBLIC_FPDF_EDIT_H_ | 307 #endif // PUBLIC_FPDF_EDIT_H_ |
| OLD | NEW |