First patch of the LockableColorPicker tool.

Still Work In Progress, but can be used without too much hassle.
This commit is contained in:
Hombre
2016-09-30 01:03:57 +02:00
parent db6b43e3c0
commit f904bc8f84
43 changed files with 14509 additions and 97 deletions

View File

@@ -48,7 +48,10 @@ struct Coord
Coord& operator+= (const Coord& other);
Coord& operator-= (const Coord& other);
Coord& operator*= (const double scale);
bool operator< (const Coord& rhs) const;
bool operator> (const Coord& rhs) const;
bool operator<=(const Coord& rhs) const;
bool operator>=(const Coord& rhs) const;
};
bool operator== (const Coord& lhs, const Coord& rhs);
@@ -130,6 +133,26 @@ inline Coord& Coord::operator*= (const double scale)
return *this;
}
inline bool Coord::operator< (const Coord& rhs) const
{
return x < rhs.x && y < rhs.y;
}
inline bool Coord::operator> (const Coord& rhs) const
{
return x > rhs.x && y > rhs.y;
}
inline bool Coord::operator<=(const Coord& rhs) const
{
return x <= rhs.x && y <= rhs.y;
}
inline bool Coord::operator>=(const Coord& rhs) const
{
return x >= rhs.x && y >= rhs.y;
}
inline bool operator== (const Coord& lhs, const Coord& rhs)
{
return lhs.x == rhs.x && lhs.y == rhs.y;