Engauge Digitizer  2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
EllipseParameters.cpp
Go to the documentation of this file.
1 /******************************************************************************************************
2  * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3  * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4  * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5  ******************************************************************************************************/
6 
7 #include "EllipseParameters.h"
8 
10  m_posCenter (QPointF (0, 0)),
11  m_angleRadians (0),
12  m_a (0),
13  m_b (0)
14 {
15 }
16 
17 EllipseParameters::EllipseParameters (const QPointF &posCenter,
18  double angleRadians,
19  double a,
20  double b) :
21  m_posCenter (posCenter),
22  m_angleRadians (angleRadians),
23  m_a (a),
24  m_b (b)
25 {
26 }
27 
29 {
30  m_posCenter = other.posCenter();
31  m_angleRadians = other.angleRadians();
32  m_a = other.a ();
33  m_b = other.b ();
34 
35  return *this;
36 }
37 
39  m_posCenter (other.posCenter()),
40  m_angleRadians (other.angleRadians()),
41  m_a (other.a ()),
42  m_b (other.b ())
43 {
44 }
46 {
47 }
48 
49 double EllipseParameters::a () const
50 {
51  return m_a;
52 }
53 
55 {
56  return m_angleRadians;
57 }
58 
59 double EllipseParameters::b () const
60 {
61  return m_b;
62 }
63 
65 {
66  return m_posCenter;
67 }
double a() const
Get method for a.
QPointF posCenter() const
Get method for center.
double angleRadians() const
Get method for angle in radians.
Parameters that define an ellipse about the specified center, at the specified angle from alignment w...
EllipseParameters & operator=(const EllipseParameters &other)
Assignment constructor.
double b() const
Get method for b.
EllipseParameters()
Constructor when this class is expected to be never used.