| 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 |
| 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 <crtdbg.h> | 10 #include <crtdbg.h> |
| (...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 pDash[i] = FXSYS_round( | 692 pDash[i] = FXSYS_round( |
| 693 pMatrix ? pMatrix->TransformDistance(pGraphState->m_DashArray[i]) | 693 pMatrix ? pMatrix->TransformDistance(pGraphState->m_DashArray[i]) |
| 694 : pGraphState->m_DashArray[i]); | 694 : pGraphState->m_DashArray[i]); |
| 695 if (pDash[i] < 1) { | 695 if (pDash[i] < 1) { |
| 696 pDash[i] = 1; | 696 pDash[i] = 1; |
| 697 } | 697 } |
| 698 } | 698 } |
| 699 } | 699 } |
| 700 HPEN hPen = ExtCreatePen(PenStyle, (DWORD)FXSYS_ceil(width), &lb, | 700 HPEN hPen = ExtCreatePen(PenStyle, (DWORD)FXSYS_ceil(width), &lb, |
| 701 pGraphState->m_DashCount, (const DWORD*)pDash); | 701 pGraphState->m_DashCount, (const DWORD*)pDash); |
| 702 if (pDash) { | 702 FX_Free(pDash); |
| 703 FX_Free(pDash); | |
| 704 } | |
| 705 return hPen; | 703 return hPen; |
| 706 } | 704 } |
| 707 static HBRUSH _CreateBrush(FX_DWORD argb) { | 705 static HBRUSH _CreateBrush(FX_DWORD argb) { |
| 708 int a; | 706 int a; |
| 709 FX_COLORREF rgb; | 707 FX_COLORREF rgb; |
| 710 ArgbDecode(argb, a, rgb); | 708 ArgbDecode(argb, a, rgb); |
| 711 return CreateSolidBrush(rgb); | 709 return CreateSolidBrush(rgb); |
| 712 } | 710 } |
| 713 static void _SetPathToDC(HDC hDC, | 711 static void _SetPathToDC(HDC hDC, |
| 714 const CFX_PathData* pPathData, | 712 const CFX_PathData* pPathData, |
| (...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1311 SelectObject(m_hDC, m_hOldBitmap); | 1309 SelectObject(m_hDC, m_hOldBitmap); |
| 1312 DeleteDC(m_hDC); | 1310 DeleteDC(m_hDC); |
| 1313 } | 1311 } |
| 1314 if (m_hBitmap) { | 1312 if (m_hBitmap) { |
| 1315 DeleteObject(m_hBitmap); | 1313 DeleteObject(m_hBitmap); |
| 1316 } | 1314 } |
| 1317 delete GetBitmap(); | 1315 delete GetBitmap(); |
| 1318 } | 1316 } |
| 1319 | 1317 |
| 1320 #endif // _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_ | 1318 #endif // _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_ |
| OLD | NEW |