Author: Carlos Lopez <[email protected]>
Date:   Fri Oct 21 19:59:46 2011 +0200

Add member to reverse a widthpoint

---

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

diff --git a/synfig-core/src/synfig/widthpoint.cpp 
b/synfig-core/src/synfig/widthpoint.cpp
index 2624a2d..5f6fc00 100644
--- a/synfig-core/src/synfig/widthpoint.cpp
+++ b/synfig-core/src/synfig/widthpoint.cpp
@@ -106,6 +106,11 @@ WidthPoint::normalize(bool loop)
        set_position(get_norm_position(loop));
 }
 
+void
+WidthPoint::reverse()
+{
+       position_=upper_bound_-(position_-lower_bound_);
+}
 
 void
 WidthPoint::set_position(const Real& x)
diff --git a/synfig-core/src/synfig/widthpoint.h 
b/synfig-core/src/synfig/widthpoint.h
index 429b206..6280baf 100644
--- a/synfig-core/src/synfig/widthpoint.h
+++ b/synfig-core/src/synfig/widthpoint.h
@@ -73,6 +73,8 @@ public:
        Real get_bound_position(bool wplistloop)const;
        // changes the widthpoint's position to be inside [0,1)
        void normalize(bool loop);
+       // reverse its position inside boundaries
+       void reverse();
 
        const Real& get_width()const;
        void set_width(Real x);


------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl

Reply via email to