X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Frect.h;h=cc21e1fe6187f496f871c717f7551973b36ad0eb;hb=c9582dc1cba08b936b35f36f36c0fa018a203a53;hp=ed658f2ee4a6366962c5180f6cd8f67f01cb3fcd;hpb=d35785acb9567468dc2a520970f3f2f9313d0fca;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/rect.h b/synfig-core/trunk/src/synfig/rect.h index ed658f2..cc21e1f 100644 --- a/synfig-core/trunk/src/synfig/rect.h +++ b/synfig-core/trunk/src/synfig/rect.h @@ -6,6 +6,7 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -167,6 +168,10 @@ public: bool operator&&(const Rect& rhs)const { return etl::intersect(*this, rhs); } + bool operator==(const Rect &rhs)const { return get_min() == rhs.get_min() && get_max() == rhs.get_max(); } + + bool operator!=(const Rect &rhs)const { return get_min() != rhs.get_min() || get_max() != rhs.get_max(); } + bool is_valid()const { return valid(); } }; // END of class Rect