| 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/fxcrt/fx_basic.h" | 7 #include "../../../include/fxcrt/fx_basic.h" |
| 8 #include "../../../include/fxge/fx_ge.h" | 8 #include "../../../include/fxge/fx_ge.h" |
| 9 CFX_ClipRgn::CFX_ClipRgn(int width, int height) | 9 CFX_ClipRgn::CFX_ClipRgn(int width, int height) |
| 10 { | 10 { |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 } | 398 } |
| 399 void CFX_PathData::Transform(const CFX_AffineMatrix* pMatrix) | 399 void CFX_PathData::Transform(const CFX_AffineMatrix* pMatrix) |
| 400 { | 400 { |
| 401 if (pMatrix == NULL) { | 401 if (pMatrix == NULL) { |
| 402 return; | 402 return; |
| 403 } | 403 } |
| 404 for (int i = 0; i < m_PointCount; i ++) { | 404 for (int i = 0; i < m_PointCount; i ++) { |
| 405 pMatrix->Transform(m_pPoints[i].m_PointX, m_pPoints[i].m_PointY); | 405 pMatrix->Transform(m_pPoints[i].m_PointX, m_pPoints[i].m_PointY); |
| 406 } | 406 } |
| 407 } | 407 } |
| 408 const int g_Distant[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; | |
| 409 FX_BOOL CFX_PathData::GetZeroAreaPath(CFX_PathData& NewPath, CFX_AffineMatrix* p
Matrix, FX_BOOL&bThin, FX_BOOL bAdjust) const | 408 FX_BOOL CFX_PathData::GetZeroAreaPath(CFX_PathData& NewPath, CFX_AffineMatrix* p
Matrix, FX_BOOL&bThin, FX_BOOL bAdjust) const |
| 410 { | 409 { |
| 411 if (m_PointCount < 3) { | 410 if (m_PointCount < 3) { |
| 412 return FALSE; | 411 return FALSE; |
| 413 } | 412 } |
| 414 if (m_PointCount == 3 && (m_pPoints[0].m_Flag & FXPT_TYPE) == FXPT_MOVETO && | 413 if (m_PointCount == 3 && (m_pPoints[0].m_Flag & FXPT_TYPE) == FXPT_MOVETO && |
| 415 (m_pPoints[1].m_Flag & FXPT_TYPE) == FXPT_LINETO && (m_pPoints[2].m_
Flag & FXPT_TYPE) == FXPT_LINETO | 414 (m_pPoints[1].m_Flag & FXPT_TYPE) == FXPT_LINETO && (m_pPoints[2].m_
Flag & FXPT_TYPE) == FXPT_LINETO |
| 416 && m_pPoints[0].m_PointX == m_pPoints[2].m_PointX && m_pPoints[0].m_
PointY == m_pPoints[2].m_PointY) { | 415 && m_pPoints[0].m_PointX == m_pPoints[2].m_PointX && m_pPoints[0].m_
PointY == m_pPoints[2].m_PointY) { |
| 417 NewPath.AddPointCount(2); | 416 NewPath.AddPointCount(2); |
| 418 if (bAdjust) { | 417 if (bAdjust) { |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 if (m_DashArray) { | 644 if (m_DashArray) { |
| 646 FX_Free(m_DashArray); | 645 FX_Free(m_DashArray); |
| 647 } | 646 } |
| 648 m_DashArray = NULL; | 647 m_DashArray = NULL; |
| 649 m_DashCount = count; | 648 m_DashCount = count; |
| 650 if (count == 0) { | 649 if (count == 0) { |
| 651 return; | 650 return; |
| 652 } | 651 } |
| 653 m_DashArray = FX_Alloc(FX_FLOAT, count); | 652 m_DashArray = FX_Alloc(FX_FLOAT, count); |
| 654 } | 653 } |
| OLD | NEW |