2 Copyright (c) 2006 Paolo Capriotti <p.capriotti@sns.it>
3 (c) 2006 Maurizio Monge <maurizio.monge@kdemail.net>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
18 static Point
invalid() { return Point(-1, -1); }
19 bool valid() const { return x
!= -1 && y
!= -1; }
25 QString
row(int ysize
) const;
28 explicit Point(const QString
& str
, int ysize
);
29 explicit Point(const QPoint
&);
31 QString
toString(int ysize
) const;
33 Point
operator+(const Point
& other
) const;
34 Point
operator+=(const Point
& other
);
35 Point
operator-() const;
36 Point
operator-(const Point
& other
) const;
37 Point
operator*(int n
) const;
38 Point
operator/(int n
) const;
39 Point
div(int n
) const;
40 bool operator==(const Point
& other
) const;
41 bool operator!=(const Point
& other
) const;
42 bool operator<(const Point
& other
) const;
43 bool operator<=(const Point
& other
) const;
45 // true if for each coordinate of other, either it
46 // is -1, or it is equal to the corresponding
48 bool resembles(const Point
& other
) const;
50 operator QPoint() const;
52 Point
normalizeInfinity() const;
56 int normalizeInfinityHelper(int n
) const;
59 std::ostream
& operator<<(std::ostream
&, const Point
&);