| 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 "xfa/fxgraphics/cfx_path_generator.h" | 7 #include "xfa/fxgraphics/cfx_path_generator.h" |
| 8 | 8 |
| 9 #include "core/fxge/include/cfx_pathdata.h" |
| 10 |
| 9 CFX_PathGenerator::CFX_PathGenerator() : m_pPathData(nullptr) {} | 11 CFX_PathGenerator::CFX_PathGenerator() : m_pPathData(nullptr) {} |
| 10 | 12 |
| 11 void CFX_PathGenerator::Create() { | 13 void CFX_PathGenerator::Create() { |
| 12 m_pPathData = new CFX_PathData; | 14 m_pPathData = new CFX_PathData; |
| 13 } | 15 } |
| 14 | 16 |
| 15 CFX_PathGenerator::~CFX_PathGenerator() { | 17 CFX_PathGenerator::~CFX_PathGenerator() { |
| 16 delete m_pPathData; | 18 delete m_pPathData; |
| 17 } | 19 } |
| 18 | 20 |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 m_pPathData->SetPoint(old_count, x, y, FXPT_MOVETO); | 190 m_pPathData->SetPoint(old_count, x, y, FXPT_MOVETO); |
| 189 m_pPathData->SetPoint(old_count + 1, x + (width * FXSYS_cos(start_angle)), | 191 m_pPathData->SetPoint(old_count + 1, x + (width * FXSYS_cos(start_angle)), |
| 190 y + (height * FXSYS_sin(start_angle)), FXPT_LINETO); | 192 y + (height * FXSYS_sin(start_angle)), FXPT_LINETO); |
| 191 return; | 193 return; |
| 192 } | 194 } |
| 193 AddArc(x, y, width, height, start_angle, sweep_angle); | 195 AddArc(x, y, width, height, start_angle, sweep_angle); |
| 194 m_pPathData->AddPointCount(1); | 196 m_pPathData->AddPointCount(1); |
| 195 m_pPathData->SetPoint(m_pPathData->GetPointCount() - 1, x, y, | 197 m_pPathData->SetPoint(m_pPathData->GetPointCount() - 1, x, y, |
| 196 FXPT_LINETO | FXPT_CLOSEFIGURE); | 198 FXPT_LINETO | FXPT_CLOSEFIGURE); |
| 197 } | 199 } |
| OLD | NEW |