2 Copyright (c) 2006 Paolo Capriotti <p.capriotti@gmail.com>
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.
19 struct TAGUA_EXPORT Point
{
20 static Point
invalid() { return Point(-1, -1); }
21 bool valid() const { return x
!= -1 && y
!= -1; }
27 QString
row(int ysize
) const;
28 QString
numcol(int xsize
) const;
30 QString
alpharow() const;
32 explicit Point(const QString
& str
, int ysize
);
33 explicit Point(const QPoint
&);
35 QString
toString(int ysize
) const;
37 Point
operator+(const Point
& other
) const;
38 Point
operator+=(const Point
& other
);
39 Point
operator-() const;
40 Point
operator-(const Point
& other
) const;
41 Point
operator*(int n
) const;
42 Point
operator/(int n
) const;
43 Point
div(int n
) const;
44 bool operator==(const Point
& other
) const;
45 bool operator!=(const Point
& other
) const;
46 bool operator<(const Point
& other
) const;
47 bool operator<=(const Point
& other
) const;
49 // true if for each coordinate of other, either it
50 // is -1, or it is equal to the corresponding
52 bool resembles(const Point
& other
) const;
54 operator QPoint() const;
56 Point
normalizeInfinity() const;
60 int normalizeInfinityHelper(int n
) const;
63 TAGUA_EXPORT
std::ostream
& operator<<(std::ostream
&, const Point
&);