dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
point.cpp
Go to the documentation of this file.
1 
13 /*
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 3 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful, but
20 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
21 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 * for more details.
23 *
24 * You should have received a copy of the GNU General Public License along
25 * with this program; if not, see <http://www.gnu.org/licenses/>
26 */
27 #include "point.h"
28 #include "size.h"
29 
30 namespace core {
32  {
33  this->x=sz.Width();
34  this->y=sz.Height();
35  empty=false;
36  }
37  Point::Point(qint64 x, qint64 y)
38  {
39  this->x=x;
40  this->y=y;
41  empty=false;
42  }
43  Point::Point():x(0),y(0),empty(true)
44  {}
45  quint64 qHash(Point const& point)
46  {
47  return point.x^point.y;
48  }
49  bool operator==(Point const &lhs,Point const &rhs)
50  {
51  return (lhs.x==rhs.x && lhs.y==rhs.y);
52  }
53  bool operator!=(Point const &lhs,Point const &rhs)
54  {
55  return !(lhs==rhs);
56  }
57  Point Point::Empty=Point();
58 
59 }
qint64 Height() const
Definition: size.h:55
bool operator==(Point const &lhs, Point const &rhs)
Definition: point.cpp:49
bool operator!=(Point const &lhs, Point const &rhs)
Definition: point.cpp:53
qint64 Width() const
Definition: size.h:54
quint64 qHash(Point const &point)
Definition: point.cpp:45
x
Definition: OPPlots.m:100
static Point Empty
Definition: point.h:57
y
Definition: OPPlots.m:101