Seamly2D
Code documentation
vcubicbezier_p.h
Go to the documentation of this file.
1 /***************************************************************************
2  * *
3  * Copyright (C) 2017 Seamly, LLC *
4  * *
5  * https://github.com/fashionfreedom/seamly2d *
6  * *
7  ***************************************************************************
8  **
9  ** Seamly2D is free software: you can redistribute it and/or modify
10  ** it under the terms of the GNU General Public License as published by
11  ** the Free Software Foundation, either version 3 of the License, or
12  ** (at your option) any later version.
13  **
14  ** Seamly2D is distributed in the hope that it will be useful,
15  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
16  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  ** GNU General Public License for more details.
18  **
19  ** You should have received a copy of the GNU General Public License
20  ** along with Seamly2D. If not, see <http://www.gnu.org/licenses/>.
21  **
22  **************************************************************************
23 
24  ************************************************************************
25  **
26  ** @file vcubicbezier_p.h
27  ** @author Roman Telezhynskyi <dismine(at)gmail.com>
28  ** @date 8 3, 2016
29  **
30  ** @brief
31  ** @copyright
32  ** This source code is part of the Valentine project, a pattern making
33  ** program, whose allow create and modeling patterns of clothing.
34  ** Copyright (C) 2016 Seamly2D project
35  ** <https://github.com/fashionfreedom/seamly2d> All Rights Reserved.
36  **
37  ** Seamly2D is free software: you can redistribute it and/or modify
38  ** it under the terms of the GNU General Public License as published by
39  ** the Free Software Foundation, either version 3 of the License, or
40  ** (at your option) any later version.
41  **
42  ** Seamly2D is distributed in the hope that it will be useful,
43  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
44  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45  ** GNU General Public License for more details.
46  **
47  ** You should have received a copy of the GNU General Public License
48  ** along with Seamly2D. If not, see <http://www.gnu.org/licenses/>.
49  **
50  *************************************************************************/
51 
52 #ifndef VCUBICBEZIER_P_H
53 #define VCUBICBEZIER_P_H
54 
55 #include <QSharedData>
56 #include <QLineF>
57 
58 #include "vpointf.h"
59 #include "../vmisc/vabstractapplication.h"
60 #include "../vmisc/diagnostic.h"
61 #include "../vmisc/vmath.h"
62 
63 QT_WARNING_PUSH
64 QT_WARNING_DISABLE_GCC("-Weffc++")
65 QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
66 
67 class VCubicBezierData : public QSharedData
68 {
69 public:
71  VCubicBezierData(const VCubicBezierData &curve);
72  VCubicBezierData(const VPointF &p1, const VPointF &p2, const VPointF &p3, const VPointF &p4);
73  virtual ~VCubicBezierData();
74 
75  /** @brief p1 first spline point. */
77 
78  /** @brief p2 fourth spline point. */
80 
81  /** @brief p3 fourth spline point. */
83 
84  /** @brief p4 fourth spline point. */
86 
87 private:
88  VCubicBezierData &operator=(const VCubicBezierData &) Q_DECL_EQ_DELETE;
89 };
90 
91 //---------------------------------------------------------------------------------------------------------------------
93  : p1(),
94  p2(),
95  p3(),
96  p4()
97 {
98 }
99 
100 //---------------------------------------------------------------------------------------------------------------------
102  : QSharedData(curve),
103  p1(curve.p1),
104  p2(curve.p2),
105  p3(curve.p3),
106  p4(curve.p4)
107 {
108 }
109 
110 //---------------------------------------------------------------------------------------------------------------------
111 VCubicBezierData::VCubicBezierData(const VPointF &p1, const VPointF &p2, const VPointF &p3, const VPointF &p4)
112  : p1(p1),
113  p2(p2),
114  p3(p3),
115  p4(p4)
116 {
117 }
118 
119 //---------------------------------------------------------------------------------------------------------------------
121 {
122 }
123 
125 
126 #endif // VCUBICBEZIER_P_H
VPointF p4
p4 fourth spline point.
VPointF p2
p2 fourth spline point.
VPointF p3
p3 fourth spline point.
VCubicBezierData & operator=(const VCubicBezierData &) Q_DECL_EQ_DELETE
virtual ~VCubicBezierData()
VPointF p1
p1 first spline point.
The VPointF class keep data of point.
Definition: vpointf.h:75