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 #ifndef XFA_FXGRAPHICS_CFX_PATH_H_ | 7 #ifndef XFA_FXGRAPHICS_CFX_PATH_H_ |
8 #define XFA_FXGRAPHICS_CFX_PATH_H_ | 8 #define XFA_FXGRAPHICS_CFX_PATH_H_ |
9 | 9 |
10 #include "core/fxcrt/include/fx_system.h" | 10 #include "core/fxcrt/include/fx_system.h" |
11 #include "xfa/fxgraphics/include/cfx_graphics.h" | 11 #include "xfa/fxgraphics/include/cfx_graphics.h" |
12 | 12 |
13 class CFX_PathData; | 13 class CFX_PathData; |
14 class CFX_PathGenerator; | 14 class CFX_PathGenerator; |
15 | 15 |
16 class CFX_Path { | 16 class CFX_Path { |
17 public: | 17 public: |
18 CFX_Path(); | 18 CFX_Path(); |
19 virtual ~CFX_Path(); | 19 virtual ~CFX_Path(); |
20 | 20 |
21 FX_ERR Create(); | 21 FWL_Error Create(); |
22 FX_ERR MoveTo(FX_FLOAT x, FX_FLOAT y); | 22 FWL_Error MoveTo(FX_FLOAT x, FX_FLOAT y); |
23 FX_ERR LineTo(FX_FLOAT x, FX_FLOAT y); | 23 FWL_Error LineTo(FX_FLOAT x, FX_FLOAT y); |
24 FX_ERR BezierTo(FX_FLOAT ctrlX1, | 24 FWL_Error BezierTo(FX_FLOAT ctrlX1, |
25 FX_FLOAT ctrlY1, | 25 FX_FLOAT ctrlY1, |
26 FX_FLOAT ctrlX2, | 26 FX_FLOAT ctrlX2, |
27 FX_FLOAT ctrlY2, | 27 FX_FLOAT ctrlY2, |
28 FX_FLOAT toX, | 28 FX_FLOAT toX, |
29 FX_FLOAT toY); | 29 FX_FLOAT toY); |
30 FX_ERR ArcTo(FX_FLOAT left, | 30 FWL_Error ArcTo(FX_FLOAT left, |
31 FX_FLOAT top, | 31 FX_FLOAT top, |
32 FX_FLOAT width, | 32 FX_FLOAT width, |
33 FX_FLOAT height, | 33 FX_FLOAT height, |
34 FX_FLOAT startAngle, | 34 FX_FLOAT startAngle, |
35 FX_FLOAT sweepAngle); | 35 FX_FLOAT sweepAngle); |
36 FX_ERR Close(); | 36 FWL_Error Close(); |
37 | 37 |
38 FX_ERR AddLine(FX_FLOAT x1, FX_FLOAT y1, FX_FLOAT x2, FX_FLOAT y2); | 38 FWL_Error AddLine(FX_FLOAT x1, FX_FLOAT y1, FX_FLOAT x2, FX_FLOAT y2); |
39 FX_ERR AddBezier(FX_FLOAT startX, | 39 FWL_Error AddBezier(FX_FLOAT startX, |
40 FX_FLOAT startY, | 40 FX_FLOAT startY, |
41 FX_FLOAT ctrlX1, | 41 FX_FLOAT ctrlX1, |
42 FX_FLOAT ctrlY1, | 42 FX_FLOAT ctrlY1, |
43 FX_FLOAT ctrlX2, | 43 FX_FLOAT ctrlX2, |
44 FX_FLOAT ctrlY2, | 44 FX_FLOAT ctrlY2, |
45 FX_FLOAT endX, | 45 FX_FLOAT endX, |
46 FX_FLOAT endY); | 46 FX_FLOAT endY); |
47 FX_ERR AddRectangle(FX_FLOAT left, | 47 FWL_Error AddRectangle(FX_FLOAT left, |
48 FX_FLOAT top, | 48 FX_FLOAT top, |
49 FX_FLOAT width, | 49 FX_FLOAT width, |
50 FX_FLOAT height); | 50 FX_FLOAT height); |
51 FX_ERR AddEllipse(FX_FLOAT left, | 51 FWL_Error AddEllipse(FX_FLOAT left, |
52 FX_FLOAT top, | 52 FX_FLOAT top, |
53 FX_FLOAT width, | 53 FX_FLOAT width, |
54 FX_FLOAT height); | 54 FX_FLOAT height); |
55 FX_ERR AddEllipse(const CFX_RectF& rect); | 55 FWL_Error AddEllipse(const CFX_RectF& rect); |
56 FX_ERR AddArc(FX_FLOAT left, | 56 FWL_Error AddArc(FX_FLOAT left, |
57 FX_FLOAT top, | 57 FX_FLOAT top, |
58 FX_FLOAT width, | 58 FX_FLOAT width, |
59 FX_FLOAT height, | 59 FX_FLOAT height, |
60 FX_FLOAT startAngle, | 60 FX_FLOAT startAngle, |
61 FX_FLOAT sweepAngle); | 61 FX_FLOAT sweepAngle); |
62 FX_ERR AddPie(FX_FLOAT left, | 62 FWL_Error AddPie(FX_FLOAT left, |
63 FX_FLOAT top, | 63 FX_FLOAT top, |
64 FX_FLOAT width, | 64 FX_FLOAT width, |
65 FX_FLOAT height, | 65 FX_FLOAT height, |
66 FX_FLOAT startAngle, | 66 FX_FLOAT startAngle, |
67 FX_FLOAT sweepAngle); | 67 FX_FLOAT sweepAngle); |
68 FX_ERR AddSubpath(CFX_Path* path); | 68 FWL_Error AddSubpath(CFX_Path* path); |
69 FX_ERR Clear(); | 69 FWL_Error Clear(); |
70 | 70 |
71 FX_BOOL IsEmpty(); | 71 FX_BOOL IsEmpty(); |
72 CFX_PathData* GetPathData(); | 72 CFX_PathData* GetPathData(); |
73 | 73 |
74 private: | 74 private: |
75 CFX_PathGenerator* m_generator; | 75 CFX_PathGenerator* m_generator; |
76 }; | 76 }; |
77 | 77 |
78 #endif // XFA_FXGRAPHICS_CFX_PATH_H_ | 78 #endif // XFA_FXGRAPHICS_CFX_PATH_H_ |
OLD | NEW |