Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Side by Side Diff: xfa/fxgraphics/cfx_path_generator.cpp

Issue 2223213002: Refactor fx_ge part 3 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fxgraphics/cfx_path_generator.h ('k') | xfa/fxgraphics/include/cfx_graphics.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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" 9 #include "core/fxge/include/cfx_pathdata.h"
10 #include "core/fxge/include/cfx_renderdevice.h"
10 11
11 CFX_PathGenerator::CFX_PathGenerator() : m_pPathData(new CFX_PathData) {} 12 CFX_PathGenerator::CFX_PathGenerator() : m_pPathData(new CFX_PathData) {}
12 13
13 CFX_PathGenerator::~CFX_PathGenerator() {} 14 CFX_PathGenerator::~CFX_PathGenerator() {}
14 15
15 void CFX_PathGenerator::AddPathData(CFX_PathData* pPathData) { 16 void CFX_PathGenerator::AddPathData(CFX_PathData* pPathData) {
16 if (pPathData && pPathData->GetPointCount() > 0) { 17 if (pPathData && pPathData->GetPointCount() > 0) {
17 int nCount = pPathData->GetPointCount(); 18 int nCount = pPathData->GetPointCount();
18 FX_PATHPOINT* pPoints = pPathData->GetPoints(); 19 FX_PATHPOINT* pPoints = pPathData->GetPoints();
19 AddPathData(pPoints, nCount); 20 AddPathData(pPoints, nCount);
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 m_pPathData->SetPoint(old_count, x, y, FXPT_MOVETO); 197 m_pPathData->SetPoint(old_count, x, y, FXPT_MOVETO);
197 m_pPathData->SetPoint(old_count + 1, x + (width * FXSYS_cos(start_angle)), 198 m_pPathData->SetPoint(old_count + 1, x + (width * FXSYS_cos(start_angle)),
198 y + (height * FXSYS_sin(start_angle)), FXPT_LINETO); 199 y + (height * FXSYS_sin(start_angle)), FXPT_LINETO);
199 return; 200 return;
200 } 201 }
201 AddArc(x, y, width, height, start_angle, sweep_angle); 202 AddArc(x, y, width, height, start_angle, sweep_angle);
202 m_pPathData->AddPointCount(1); 203 m_pPathData->AddPointCount(1);
203 m_pPathData->SetPoint(m_pPathData->GetPointCount() - 1, x, y, 204 m_pPathData->SetPoint(m_pPathData->GetPointCount() - 1, x, y,
204 FXPT_LINETO | FXPT_CLOSEFIGURE); 205 FXPT_LINETO | FXPT_CLOSEFIGURE);
205 } 206 }
OLDNEW
« no previous file with comments | « xfa/fxgraphics/cfx_path_generator.h ('k') | xfa/fxgraphics/include/cfx_graphics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698