Module: synfig/synfig
Branch: genete_width_outline
Commit: 6466b26650a5237bdc7f50f4fc135493c0e36c3f
URL:    
http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig/synfig;a=commit;h=6466b26650a5237bdc7f50f4fc135493c0e36c3f

Author: Carlos Lopez <[email protected]>
Date:   Fri Jan  7 14:22:04 2011 +0100

Minor corrections

---

 synfig-core/src/synfig/valuenode_wplist.cpp |   16 ++++++++--------
 synfig-core/src/synfig/valuenode_wplist.h   |    4 ++--
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/synfig-core/src/synfig/valuenode_wplist.cpp 
b/synfig-core/src/synfig/valuenode_wplist.cpp
index abc8726..9331804 100644
--- a/synfig-core/src/synfig/valuenode_wplist.cpp
+++ b/synfig-core/src/synfig/valuenode_wplist.cpp
@@ -53,10 +53,9 @@ using namespace synfig;
 
 /* === P R O C E D U R E S ================================================= */
 
-// convert_bline_to_width_list(const ValueBase& bline)
-// This fun
+//! Converts a ValueNode_BLine into a WidthPoint list
 ValueBase
-synfig::convert_bline_to_width_list(const ValueBase& bline)
+synfig::convert_bline_to_wpoint_list(const ValueBase& bline)
 {
        // returns if the parameter is not a list or if it is a list, it is 
empty
        if(bline.empty())
@@ -113,9 +112,9 @@ ValueNode_WPList::create(const ValueBase &value)
        // if the parameter is not a list type, return null
        if(value.get_type()!=ValueBase::TYPE_LIST)
                return NULL;
-
+       // create an empty list
        ValueNode_WPList* value_node(new ValueNode_WPList());
-
+       // If the value parameter is not empty
        if(!value.empty())
        {
                switch(value.get_contained_type())
@@ -169,6 +168,8 @@ ValueNode_WPList::create_list_entry(Real position, Time 
time)
        ret.set_parent_value_node(this);
 
        // TODO: define those functions
+       // Given a time and a postion, those functions returns a valid withpoint
+       // (fully on) before or after that position
        next=find_next_valid_entry_by_postion(position, time);
        prev=find_prev_valid_entry_by_postion(position, time);
 
@@ -208,7 +209,6 @@ ValueNode_WPList::operator()(Time t)const
 
        std::vector<ListEntry>::const_iterator iter,first_iter;
        bool rising;
-       float next_scale(1.0f);
 
        WidthPoint curr;
 
@@ -225,7 +225,7 @@ ValueNode_WPList::operator()(Time t)const
                if (amount > 1.0f - 0.0000001f)
                {
                        // we store the current width point
-                       curr=(*iter->value_node)(t).get(prev);
+                       curr=(*iter->value_node)(t).get(curr);
                        // and push back to the returning list
                        ret_list.push_back(curr);
                }
@@ -234,7 +234,7 @@ ValueNode_WPList::operator()(Time t)const
                {
                        // This is where the interesting stuff happens
                        // We need to seek in the list to see what the next and 
prev
-                       // active width point are
+                       // active width points are
 
                        WidthPoint wp_on;  // the current widthpoint, when 
fully on
                        WidthPoint wp_off; // the current widthpoint, when 
fully off
diff --git a/synfig-core/src/synfig/valuenode_wplist.h 
b/synfig-core/src/synfig/valuenode_wplist.h
index 4446a1e..076a973 100644
--- a/synfig-core/src/synfig/valuenode_wplist.h
+++ b/synfig-core/src/synfig/valuenode_wplist.h
@@ -66,8 +66,8 @@ public:
        virtual String get_name()const;
        virtual String get_local_name()const;
        //! Inserts a new entry at index with time used for
-       //! \param index the index of the width point where to insert the new 
one before it
-       //! \param time the time when inserted when in animation mode
+       //! \param position the position of the width point to be inserted
+       //! \param time the time when inserted in animation mode
        //! \return the new List Entry
        virtual ListEntry create_list_entry(Real position, Time time=0);
 


------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl

Reply via email to