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 "core/fxge/include/fx_ge.h" | 7 #include "core/fxge/include/fx_ge.h" |
8 | 8 |
9 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ | 9 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ |
10 #include <windows.h> | 10 #include <windows.h> |
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
679 m_pGdiAddFontMemResourceEx = NULL; | 679 m_pGdiAddFontMemResourceEx = NULL; |
680 m_pGdiRemoveFontMemResourseEx = NULL; | 680 m_pGdiRemoveFontMemResourseEx = NULL; |
681 } | 681 } |
682 void CGdiplusExt::Load() { | 682 void CGdiplusExt::Load() { |
683 CFX_ByteString strPlusPath = ""; | 683 CFX_ByteString strPlusPath = ""; |
684 FX_CHAR buf[MAX_PATH]; | 684 FX_CHAR buf[MAX_PATH]; |
685 GetSystemDirectoryA(buf, MAX_PATH); | 685 GetSystemDirectoryA(buf, MAX_PATH); |
686 strPlusPath += buf; | 686 strPlusPath += buf; |
687 strPlusPath += "\\"; | 687 strPlusPath += "\\"; |
688 strPlusPath += "GDIPLUS.DLL"; | 688 strPlusPath += "GDIPLUS.DLL"; |
689 m_hModule = LoadLibraryA(strPlusPath); | 689 m_hModule = LoadLibraryA(strPlusPath.c_str()); |
690 if (!m_hModule) { | 690 if (!m_hModule) { |
691 return; | 691 return; |
692 } | 692 } |
693 for (int i = 0; i < sizeof g_GdipFuncNames / sizeof(LPCSTR); i++) { | 693 for (int i = 0; i < sizeof g_GdipFuncNames / sizeof(LPCSTR); i++) { |
694 m_Functions[i] = GetProcAddress(m_hModule, g_GdipFuncNames[i]); | 694 m_Functions[i] = GetProcAddress(m_hModule, g_GdipFuncNames[i]); |
695 if (!m_Functions[i]) { | 695 if (!m_Functions[i]) { |
696 m_hModule = NULL; | 696 m_hModule = NULL; |
697 return; | 697 return; |
698 } | 698 } |
699 } | 699 } |
(...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1509 dest_pitch); | 1509 dest_pitch); |
1510 } | 1510 } |
1511 } | 1511 } |
1512 CFX_DIBitmap* pDIBitmap = _FX_WindowsDIB_LoadFromBuf( | 1512 CFX_DIBitmap* pDIBitmap = _FX_WindowsDIB_LoadFromBuf( |
1513 pInfo->pbmi, pData, pInfo->pbmi->bmiHeader.biBitCount == 32); | 1513 pInfo->pbmi, pData, pInfo->pbmi->bmiHeader.biBitCount == 32); |
1514 FX_Free(pData); | 1514 FX_Free(pData); |
1515 FreeDIBitmap(pInfo); | 1515 FreeDIBitmap(pInfo); |
1516 return pDIBitmap; | 1516 return pDIBitmap; |
1517 } | 1517 } |
1518 #endif | 1518 #endif |
OLD | NEW |