OLD | NEW |
1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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/cfx_pathdata.h" | 7 #include "core/fxge/include/cfx_pathdata.h" |
8 | 8 |
9 #include "core/fxcrt/include/fx_system.h" | 9 #include "core/fxcrt/fx_system.h" |
10 #include "third_party/base/numerics/safe_math.h" | 10 #include "third_party/base/numerics/safe_math.h" |
11 | 11 |
12 CFX_PathData::CFX_PathData() | 12 CFX_PathData::CFX_PathData() |
13 : m_PointCount(0), m_AllocCount(0), m_pPoints(nullptr) {} | 13 : m_PointCount(0), m_AllocCount(0), m_pPoints(nullptr) {} |
14 | 14 |
15 CFX_PathData::~CFX_PathData() { | 15 CFX_PathData::~CFX_PathData() { |
16 FX_Free(m_pPoints); | 16 FX_Free(m_pPoints); |
17 } | 17 } |
18 | 18 |
19 void CFX_PathData::SetPointCount(int nPoints) { | 19 void CFX_PathData::SetPointCount(int nPoints) { |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 pRect->top = y[2]; | 523 pRect->top = y[2]; |
524 pRect->Normalize(); | 524 pRect->Normalize(); |
525 } | 525 } |
526 return TRUE; | 526 return TRUE; |
527 } | 527 } |
528 | 528 |
529 void CFX_PathData::Copy(const CFX_PathData& src) { | 529 void CFX_PathData::Copy(const CFX_PathData& src) { |
530 SetPointCount(src.m_PointCount); | 530 SetPointCount(src.m_PointCount); |
531 FXSYS_memcpy(m_pPoints, src.m_pPoints, sizeof(FX_PATHPOINT) * m_PointCount); | 531 FXSYS_memcpy(m_pPoints, src.m_pPoints, sizeof(FX_PATHPOINT) * m_PointCount); |
532 } | 532 } |
OLD | NEW |