1 /** Aesalon, a tool to visualize program behaviour in real time.
2 Copyright (C) 2009-2011, Aesalon development team.
4 Aesalon is distributed under the terms of the GNU GPLv3. See
5 the included file LICENSE for more information.
7 @file include/artisan/gviewport/Point.h
10 #ifndef AesalonArtisan_GViewport_Point_H
11 #define AesalonArtisan_GViewport_Point_H
23 Point(double x
, double y
) : m_x(x
), m_y(y
) {}
24 Point(const QPoint
&point
) : m_x(point
.x()), m_y(point
.y()) {}
26 double &x() { return m_x
; }
27 double x() const { return m_x
; }
28 double &y() { return m_y
; }
29 double y() const { return m_y
; }
31 Point
operator+(const Point
&other
) const {
32 return Point(m_x
+ other
.m_x
, m_y
+ other
.m_y
);
35 QPointF
toQPoint() const {
36 return QPointF(m_x
, m_y
);
40 } // namespace GViewport
41 } // namespace Artisan