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 #include "../../../include/fxge/fx_ge.h" | 7 #include "../../../include/fxge/fx_ge.h" |
| 8 |
8 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ | 9 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ |
9 #include <windows.h> | 10 #include <windows.h> |
10 #include <algorithm> | 11 #include <algorithm> |
| 12 |
11 namespace Gdiplus { | 13 namespace Gdiplus { |
12 using std::min; | 14 using std::min; |
13 using std::max; | 15 using std::max; |
14 } // namespace Gdiplus | 16 } // namespace Gdiplus |
| 17 |
15 #include <gdiplus.h> | 18 #include <gdiplus.h> |
16 #include "../../../include/fxge/fx_ge_win32.h" | 19 #include "../../../include/fxge/fx_ge_win32.h" |
17 #include "win32_int.h" | 20 #include "win32_int.h" |
| 21 |
18 using namespace Gdiplus; | 22 using namespace Gdiplus; |
19 using namespace Gdiplus::DllExports; | 23 using namespace Gdiplus::DllExports; |
| 24 |
20 #define GdiFillType2Gdip(fill_type) \ | 25 #define GdiFillType2Gdip(fill_type) \ |
21 (fill_type == ALTERNATE ? FillModeAlternate : FillModeWinding) | 26 (fill_type == ALTERNATE ? FillModeAlternate : FillModeWinding) |
| 27 |
22 static CombineMode GdiCombineMode2Gdip(int mode) { | 28 static CombineMode GdiCombineMode2Gdip(int mode) { |
23 switch (mode) { | 29 switch (mode) { |
24 case RGN_AND: | 30 case RGN_AND: |
25 return CombineModeIntersect; | 31 return CombineModeIntersect; |
26 } | 32 } |
27 return CombineModeIntersect; | 33 return CombineModeIntersect; |
28 } | 34 } |
29 enum { | 35 enum { |
30 FuncId_GdipCreatePath2, | 36 FuncId_GdipCreatePath2, |
31 FuncId_GdipSetPenDashStyle, | 37 FuncId_GdipSetPenDashStyle, |
(...skipping 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1511 dest_pitch); | 1517 dest_pitch); |
1512 } | 1518 } |
1513 } | 1519 } |
1514 CFX_DIBitmap* pDIBitmap = _FX_WindowsDIB_LoadFromBuf( | 1520 CFX_DIBitmap* pDIBitmap = _FX_WindowsDIB_LoadFromBuf( |
1515 pInfo->pbmi, pData, pInfo->pbmi->bmiHeader.biBitCount == 32); | 1521 pInfo->pbmi, pData, pInfo->pbmi->bmiHeader.biBitCount == 32); |
1516 FX_Free(pData); | 1522 FX_Free(pData); |
1517 FreeDIBitmap(pInfo); | 1523 FreeDIBitmap(pInfo); |
1518 return pDIBitmap; | 1524 return pDIBitmap; |
1519 } | 1525 } |
1520 #endif | 1526 #endif |
OLD | NEW |