Author: Carlos Lopez <[email protected]>
Date:   Sat Mar 12 11:56:53 2011 +0100

Add member to compare two withpoints

---

 synfig-core/src/synfig/widthpoint.cpp |    9 +++++++++
 synfig-core/src/synfig/widthpoint.h   |    1 +
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/synfig-core/src/synfig/widthpoint.cpp 
b/synfig-core/src/synfig/widthpoint.cpp
index 6bb7748..5be8e0b 100644
--- a/synfig-core/src/synfig/widthpoint.cpp
+++ b/synfig-core/src/synfig/widthpoint.cpp
@@ -137,3 +137,12 @@ WidthPoint::operator<(const WidthPoint& rhs)
 {
        return get_norm_position() < rhs.get_norm_position();
 }
+
+bool
+WidthPoint::operator == (const WidthPoint& rhs)
+{
+       return  side_type_[0] == rhs.get_side_type(0) &&
+                       side_type_[1] == rhs.get_side_type(1) &&
+                       position_ == rhs.get_position() &&
+                       width_ == rhs.get_width();
+}
diff --git a/synfig-core/src/synfig/widthpoint.h 
b/synfig-core/src/synfig/widthpoint.h
index de74401..0958664 100644
--- a/synfig-core/src/synfig/widthpoint.h
+++ b/synfig-core/src/synfig/widthpoint.h
@@ -75,6 +75,7 @@ public:
        void set_side_type_after(int sideafter);
        int get_side_type(int i)const;
        bool operator < (const WidthPoint& rhs);
+       bool operator == (const WidthPoint& rhs);
 
 }; // END of class WidthPoint
 


------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl

Reply via email to