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 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_ | 8 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_ |
9 #include "../../../include/fxge/fx_ge_win32.h" | 9 #include "../../../include/fxge/fx_ge_win32.h" |
10 #include <crtdbg.h> | 10 #include <crtdbg.h> |
(...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1149 IFX_RenderDeviceDriver* CFX_WindowsDevice::CreateDriver(HDC hDC, FX_BOOL bCmykOu
tput) | 1149 IFX_RenderDeviceDriver* CFX_WindowsDevice::CreateDriver(HDC hDC, FX_BOOL bCmykOu
tput) |
1150 { | 1150 { |
1151 int device_type = ::GetDeviceCaps(hDC, TECHNOLOGY); | 1151 int device_type = ::GetDeviceCaps(hDC, TECHNOLOGY); |
1152 int obj_type = ::GetObjectType(hDC); | 1152 int obj_type = ::GetObjectType(hDC); |
1153 int device_class; | 1153 int device_class; |
1154 if (device_type == DT_RASPRINTER || device_type == DT_PLOTTER || obj_type ==
OBJ_ENHMETADC) { | 1154 if (device_type == DT_RASPRINTER || device_type == DT_PLOTTER || obj_type ==
OBJ_ENHMETADC) { |
1155 device_class = FXDC_PRINTER; | 1155 device_class = FXDC_PRINTER; |
1156 } else { | 1156 } else { |
1157 device_class = FXDC_DISPLAY; | 1157 device_class = FXDC_DISPLAY; |
1158 } | 1158 } |
| 1159 #ifndef _FPDFAPI_MINI_ |
| 1160 if (device_class == FXDC_PRINTER) { |
| 1161 return FX_NEW CGdiPrinterDriver(hDC); |
| 1162 } |
| 1163 #endif |
1159 return FX_NEW CGdiDisplayDriver(hDC); | 1164 return FX_NEW CGdiDisplayDriver(hDC); |
1160 } | 1165 } |
1161 CFX_WinBitmapDevice::CFX_WinBitmapDevice(int width, int height, FXDIB_Format for
mat) | 1166 CFX_WinBitmapDevice::CFX_WinBitmapDevice(int width, int height, FXDIB_Format for
mat) |
1162 { | 1167 { |
1163 BITMAPINFOHEADER bmih; | 1168 BITMAPINFOHEADER bmih; |
1164 FXSYS_memset32(&bmih, 0, sizeof (BITMAPINFOHEADER)); | 1169 FXSYS_memset32(&bmih, 0, sizeof (BITMAPINFOHEADER)); |
1165 bmih.biSize = sizeof(BITMAPINFOHEADER); | 1170 bmih.biSize = sizeof(BITMAPINFOHEADER); |
1166 bmih.biBitCount = format & 0xff; | 1171 bmih.biBitCount = format & 0xff; |
1167 bmih.biHeight = -height; | 1172 bmih.biHeight = -height; |
1168 bmih.biPlanes = 1; | 1173 bmih.biPlanes = 1; |
(...skipping 22 matching lines...) Expand all Loading... |
1191 if (m_hDC) { | 1196 if (m_hDC) { |
1192 SelectObject(m_hDC, m_hOldBitmap); | 1197 SelectObject(m_hDC, m_hOldBitmap); |
1193 DeleteDC(m_hDC); | 1198 DeleteDC(m_hDC); |
1194 } | 1199 } |
1195 if (m_hBitmap) { | 1200 if (m_hBitmap) { |
1196 DeleteObject(m_hBitmap); | 1201 DeleteObject(m_hBitmap); |
1197 } | 1202 } |
1198 delete GetBitmap(); | 1203 delete GetBitmap(); |
1199 } | 1204 } |
1200 #endif | 1205 #endif |
OLD | NEW |