First patch of the LockableColorPicker tool.
Still Work In Progress, but can be used without too much hassle.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user