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

Side by Side Diff: core/fxge/include/cfx_pathdata.h

Issue 2216853004: Refactor fx_ge part 2 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fixing build, comments 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 | « core/fxge/include/cfx_gemodule.h ('k') | core/fxge/include/fx_ge.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #ifndef CORE_FXGE_INCLUDE_CFX_PATHDATA_H_
8 #define CORE_FXGE_INCLUDE_CFX_PATHDATA_H_
9
10 #include "core/fxcrt/include/fx_coordinates.h"
11 #include "core/fxcrt/include/fx_system.h"
12
13 struct FX_PATHPOINT {
14 FX_FLOAT m_PointX;
15 FX_FLOAT m_PointY;
16 int m_Flag;
17 };
18
19 class CFX_PathData {
20 public:
21 CFX_PathData();
22 CFX_PathData(const CFX_PathData& src);
23 ~CFX_PathData();
24
25 int GetPointCount() const { return m_PointCount; }
26 int GetFlag(int index) const { return m_pPoints[index].m_Flag; }
27 FX_FLOAT GetPointX(int index) const { return m_pPoints[index].m_PointX; }
28 FX_FLOAT GetPointY(int index) const { return m_pPoints[index].m_PointY; }
29 FX_PATHPOINT* GetPoints() const { return m_pPoints; }
30
31 void SetPointCount(int nPoints);
32 void AllocPointCount(int nPoints);
33 void AddPointCount(int addPoints);
34 CFX_FloatRect GetBoundingBox() const;
35 CFX_FloatRect GetBoundingBox(FX_FLOAT line_width, FX_FLOAT miter_limit) const;
36 void Transform(const CFX_Matrix* pMatrix);
37 FX_BOOL IsRect() const;
38 FX_BOOL GetZeroAreaPath(CFX_PathData& NewPath,
39 CFX_Matrix* pMatrix,
40 FX_BOOL& bThin,
41 FX_BOOL bAdjust) const;
42 FX_BOOL IsRect(const CFX_Matrix* pMatrix, CFX_FloatRect* rect) const;
43 void Append(const CFX_PathData* pSrc, const CFX_Matrix* pMatrix);
44 void AppendRect(FX_FLOAT left, FX_FLOAT bottom, FX_FLOAT right, FX_FLOAT top);
45 void SetPoint(int index, FX_FLOAT x, FX_FLOAT y, int flag);
46 void TrimPoints(int nPoints);
47 void Copy(const CFX_PathData& src);
48
49 private:
50 friend class CPDF_Path;
51
52 int m_PointCount;
53 FX_PATHPOINT* m_pPoints;
54 int m_AllocCount;
55 };
56
57 #endif // CORE_FXGE_INCLUDE_CFX_PATHDATA_H_
OLDNEW
« no previous file with comments | « core/fxge/include/cfx_gemodule.h ('k') | core/fxge/include/fx_ge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698