OLD | NEW |
| (Empty) |
1 // Copyright 2014 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 XFA_SRC_FDE_FDE_GEOBJECT_H_ | |
8 #define XFA_SRC_FDE_FDE_GEOBJECT_H_ | |
9 | |
10 #include "core/include/fxge/fx_ge.h" | |
11 #include "xfa/src/fde/fde_path.h" | |
12 #include "xfa/src/fgas/crt/fgas_memory.h" | |
13 | |
14 class CFDE_Path : public IFDE_Path, public CFX_Target { | |
15 public: | |
16 virtual void Release() { delete this; } | |
17 | |
18 virtual FX_BOOL StartFigure(); | |
19 virtual FX_BOOL CloseFigure(); | |
20 | |
21 virtual void AddBezier(const CFX_PointsF& points); | |
22 virtual void AddBeziers(const CFX_PointsF& points); | |
23 virtual void AddCurve(const CFX_PointsF& points, | |
24 FX_BOOL bClosed, | |
25 FX_FLOAT fTension = 0.5f); | |
26 virtual void AddEllipse(const CFX_RectF& rect); | |
27 virtual void AddLines(const CFX_PointsF& points); | |
28 virtual void AddLine(const CFX_PointF& pt1, const CFX_PointF& pt2); | |
29 virtual void AddPath(const IFDE_Path* pSrc, FX_BOOL bConnect); | |
30 virtual void AddPolygon(const CFX_PointsF& points); | |
31 virtual void AddRectangle(const CFX_RectF& rect); | |
32 virtual void GetBBox(CFX_RectF& bbox) const; | |
33 virtual void GetBBox(CFX_RectF& bbox, | |
34 FX_FLOAT fLineWidth, | |
35 FX_FLOAT fMiterLimit) const; | |
36 FX_PATHPOINT* AddPoints(int32_t iCount); | |
37 FX_PATHPOINT* GetLastPoint(int32_t iCount = 1) const; | |
38 FX_BOOL FigureClosed() const; | |
39 void MoveTo(FX_FLOAT fx, FX_FLOAT fy); | |
40 void LineTo(FX_FLOAT fx, FX_FLOAT fy); | |
41 void BezierTo(const CFX_PointF& p1, | |
42 const CFX_PointF& p2, | |
43 const CFX_PointF& p3); | |
44 void ArcTo(FX_BOOL bStart, | |
45 const CFX_RectF& rect, | |
46 FX_FLOAT startAngle, | |
47 FX_FLOAT endAngle); | |
48 void MoveTo(const CFX_PointF& p0) { MoveTo(p0.x, p0.y); } | |
49 void LineTo(const CFX_PointF& p1) { LineTo(p1.x, p1.y); } | |
50 void GetCurveTangents(const CFX_PointsF& points, | |
51 CFX_PointsF& tangents, | |
52 FX_BOOL bClosed, | |
53 FX_FLOAT fTension) const; | |
54 CFX_PathData m_Path; | |
55 }; | |
56 | |
57 #endif // XFA_SRC_FDE_FDE_GEOBJECT_H_ | |
OLD | NEW |