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)(((uint32_t)(b)&0xff) | (((uint32_t)(g)&0xff) << 8) | \ |
20 (((FX_DWORD)(uint8_t)(r)) << 16)))) | \ | 20 (((uint32_t)(r)&0xff) << 16) | (((uint32_t)(a)&0xff) << 24))) |
21 (((FX_DWORD)(uint8_t)(a)) << 24)) | |
22 #define FPDF_GetBValue(argb) ((uint8_t)(argb)) | 21 #define FPDF_GetBValue(argb) ((uint8_t)(argb)) |
23 #define FPDF_GetGValue(argb) ((uint8_t)(((uint16_t)(argb)) >> 8)) | 22 #define FPDF_GetGValue(argb) ((uint8_t)(((uint16_t)(argb)) >> 8)) |
24 #define FPDF_GetRValue(argb) ((uint8_t)((argb) >> 16)) | 23 #define FPDF_GetRValue(argb) ((uint8_t)((argb) >> 16)) |
25 #define FPDF_GetAValue(argb) ((uint8_t)((argb) >> 24)) | 24 #define FPDF_GetAValue(argb) ((uint8_t)((argb) >> 24)) |
26 | 25 |
27 #ifdef __cplusplus | 26 #ifdef __cplusplus |
28 extern "C" { | 27 extern "C" { |
29 #endif | 28 #endif |
30 | 29 |
31 ////////////////////////////////////////////////////////////////////// | 30 ////////////////////////////////////////////////////////////////////// |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 DLLEXPORT FPDF_BOOL STDCALL FPDFImageObj_SetBitmap(FPDF_PAGE* pages, | 297 DLLEXPORT FPDF_BOOL STDCALL FPDFImageObj_SetBitmap(FPDF_PAGE* pages, |
299 int nCount, | 298 int nCount, |
300 FPDF_PAGEOBJECT image_object, | 299 FPDF_PAGEOBJECT image_object, |
301 FPDF_BITMAP bitmap); | 300 FPDF_BITMAP bitmap); |
302 | 301 |
303 #ifdef __cplusplus | 302 #ifdef __cplusplus |
304 } | 303 } |
305 #endif | 304 #endif |
306 | 305 |
307 #endif // PUBLIC_FPDF_EDIT_H_ | 306 #endif // PUBLIC_FPDF_EDIT_H_ |
OLD | NEW |