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 #include <algorithm> | 9 #include <algorithm> |
10 #include <memory> | 10 #include <memory> |
(...skipping 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1111 DeleteObject(hBrush); | 1111 DeleteObject(hBrush); |
1112 return TRUE; | 1112 return TRUE; |
1113 } | 1113 } |
1114 | 1114 |
1115 FX_BOOL CGdiDeviceDriver::SetClip_PathFill(const CFX_PathData* pPathData, | 1115 FX_BOOL CGdiDeviceDriver::SetClip_PathFill(const CFX_PathData* pPathData, |
1116 const CFX_Matrix* pMatrix, | 1116 const CFX_Matrix* pMatrix, |
1117 int fill_mode) { | 1117 int fill_mode) { |
1118 if (pPathData->GetPointCount() == 5) { | 1118 if (pPathData->GetPointCount() == 5) { |
1119 CFX_FloatRect rectf; | 1119 CFX_FloatRect rectf; |
1120 if (pPathData->IsRect(pMatrix, &rectf)) { | 1120 if (pPathData->IsRect(pMatrix, &rectf)) { |
1121 FX_RECT rect = rectf.GetOutterRect(); | 1121 FX_RECT rect = rectf.GetOuterRect(); |
1122 IntersectClipRect(m_hDC, rect.left, rect.top, rect.right, rect.bottom); | 1122 IntersectClipRect(m_hDC, rect.left, rect.top, rect.right, rect.bottom); |
1123 return TRUE; | 1123 return TRUE; |
1124 } | 1124 } |
1125 } | 1125 } |
1126 SetPathToDC(m_hDC, pPathData, pMatrix); | 1126 SetPathToDC(m_hDC, pPathData, pMatrix); |
1127 SetPolyFillMode(m_hDC, fill_mode & 3); | 1127 SetPolyFillMode(m_hDC, fill_mode & 3); |
1128 SelectClipPath(m_hDC, RGN_AND); | 1128 SelectClipPath(m_hDC, RGN_AND); |
1129 return TRUE; | 1129 return TRUE; |
1130 } | 1130 } |
1131 | 1131 |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1386 int device_type = ::GetDeviceCaps(hDC, TECHNOLOGY); | 1386 int device_type = ::GetDeviceCaps(hDC, TECHNOLOGY); |
1387 int obj_type = ::GetObjectType(hDC); | 1387 int obj_type = ::GetObjectType(hDC); |
1388 bool use_printer = device_type == DT_RASPRINTER || | 1388 bool use_printer = device_type == DT_RASPRINTER || |
1389 device_type == DT_PLOTTER || obj_type == OBJ_ENHMETADC; | 1389 device_type == DT_PLOTTER || obj_type == OBJ_ENHMETADC; |
1390 if (use_printer) | 1390 if (use_printer) |
1391 return new CGdiPrinterDriver(hDC); | 1391 return new CGdiPrinterDriver(hDC); |
1392 return new CGdiDisplayDriver(hDC); | 1392 return new CGdiDisplayDriver(hDC); |
1393 } | 1393 } |
1394 | 1394 |
1395 #endif // _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_ | 1395 #endif // _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_ |
OLD | NEW |