Module: synfig/synfig Branch: genete_width_outline Commit: a40177850156e2df7da378c07f381ea6fcabbf1d URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig/synfig;a=commit;h=a40177850156e2df7da378c07f381ea6fcabbf1d
Author: Carlos Lopez <[email protected]> Date: Sun Jan 9 18:21:21 2011 +0100 Rename 'cup' to 'side' at Width Point class and where it is used. --- synfig-core/src/synfig/valuenode_composite.cpp | 16 ++++++------ synfig-core/src/synfig/valuenode_wplist.cpp | 14 ++++++------ synfig-core/src/synfig/widthpoint.cpp | 28 ++++++++++++------------ synfig-core/src/synfig/widthpoint.h | 26 +++++++++++----------- 4 files changed, 42 insertions(+), 42 deletions(-) diff --git a/synfig-core/src/synfig/valuenode_composite.cpp b/synfig-core/src/synfig/valuenode_composite.cpp index 5459ce8..e0f47bf 100644 --- a/synfig-core/src/synfig/valuenode_composite.cpp +++ b/synfig-core/src/synfig/valuenode_composite.cpp @@ -94,8 +94,8 @@ synfig::ValueNode_Composite::ValueNode_Composite(const ValueBase &value): WidthPoint wpoint(value); set_link("position",ValueNode_Const::create(wpoint.get_position())); set_link("width",ValueNode_Const::create(wpoint.get_width())); - set_link("cup_before",ValueNode_Const::create(wpoint.get_cup_type_before())); - set_link("cup_after",ValueNode_Const::create(wpoint.get_cup_type_after())); + set_link("side_before",ValueNode_Const::create(wpoint.get_side_type_before())); + set_link("side_after",ValueNode_Const::create(wpoint.get_side_type_after())); break; } default: @@ -176,8 +176,8 @@ synfig::ValueNode_Composite::operator()(Time t)const assert(components[0] && components[1] && components[2] && components[3]); ret.set_position((*components[0])(t).get(Real())); ret.set_width((*components[1])(t).get(Real())); - ret.set_cup_type_before((*components[2])(t).get(int())); - ret.set_cup_type_after((*components[3])(t).get(int())); + ret.set_side_type_before((*components[2])(t).get(int())); + ret.set_side_type_after((*components[3])(t).get(int())); return ret; } default: @@ -405,8 +405,8 @@ ValueNode_Composite::link_name(int i)const { case 0: return "position"; case 1: return "width"; - case 2: return "cup_before"; - case 3: return "cup_after"; + case 2: return "side_before"; + case 3: return "side_after"; } break; @@ -475,9 +475,9 @@ ValueNode_Composite::get_link_index_from_name(const String &name)const return 0; if(name=="width") return 1; - if(name=="cup_before") + if(name=="side_before") return 2; - if(name=="cup_after") + if(name=="side_after") return 3; default: break; diff --git a/synfig-core/src/synfig/valuenode_wplist.cpp b/synfig-core/src/synfig/valuenode_wplist.cpp index 77ee3d1..ed019b3 100644 --- a/synfig-core/src/synfig/valuenode_wplist.cpp +++ b/synfig-core/src/synfig/valuenode_wplist.cpp @@ -86,9 +86,9 @@ synfig::convert_bline_to_wplist(const ValueBase& bline) std::vector<WidthPoint>::iterator iter; iter=ret.end(); iter--; - iter->set_cup_type_after(WidthPoint::CUPTYPE_ROUNDED); + iter->set_side_type_after(WidthPoint::TYPE_ROUNDED); iter=ret.begin(); - iter->set_cup_type_before(WidthPoint::CUPTYPE_ROUNDED); + iter->set_side_type_before(WidthPoint::TYPE_ROUNDED); } return ValueBase(ret); @@ -317,7 +317,7 @@ ValueNode_WPList::interpolated_width(Real position, Time time)const Real ValueNode_WPList::interpolate(WidthPoint& prev, WidthPoint& next, Real position)const { - WidthPoint::CupType cup_int(WidthPoint::CUPTYPE_INTERPOLATE); + WidthPoint::SideType side_int(WidthPoint::TYPE_INTERPOLATE); Real ppos, npos; Real nw, pw, rw(0.0); @@ -328,9 +328,9 @@ ValueNode_WPList::interpolate(WidthPoint& prev, WidthPoint& next, Real position) if(position < npos && position > ppos) { Real p; - if(next.get_cup_type_before() != cup_int) + if(next.get_side_type_before() != side_int) nw=0.0; - if(prev.get_cup_type_after() != cup_int) + if(prev.get_side_type_after() != side_int) pw=0.0; //if previous and next are so close if(npos-ppos < Real(0.0000001f)) @@ -342,12 +342,12 @@ ValueNode_WPList::interpolate(WidthPoint& prev, WidthPoint& next, Real position) } else if(position > npos) { - if(next.get_cup_type_after() == cup_int) + if(next.get_side_type_after() == side_int) rw=nw; } else if(position < ppos) { - if(prev.get_cup_type_before() == cup_int) + if(prev.get_side_type_before() == side_int) rw=pw; } else if(position == npos) diff --git a/synfig-core/src/synfig/widthpoint.cpp b/synfig-core/src/synfig/widthpoint.cpp index 67abe3d..2392a59 100644 --- a/synfig-core/src/synfig/widthpoint.cpp +++ b/synfig-core/src/synfig/widthpoint.cpp @@ -52,15 +52,15 @@ WidthPoint::WidthPoint(): position_(0.0), width_(0.01) { - cup_type_[0] = cup_type_[1] = CUPTYPE_INTERPOLATE; + side_type_[0] = side_type_[1] = TYPE_INTERPOLATE; } -WidthPoint::WidthPoint(Real position, Real width, int cupbefore, int cupafter): +WidthPoint::WidthPoint(Real position, Real width, int sidebefore, int sideafter): position_(position), width_(width) { - cup_type_[0]=cupbefore; - cup_type_[1]=cupafter; + side_type_[0]=sidebefore; + side_type_[1]=sideafter; } const Real& @@ -98,31 +98,31 @@ WidthPoint::set_width(Real x) } int -WidthPoint::get_cup_type_before() +WidthPoint::get_side_type_before() { - return cup_type_[0]; + return side_type_[0]; } void -WidthPoint::set_cup_type_before(int cupbefore) +WidthPoint::set_side_type_before(int sidebefore) { - cup_type_[0]=cupbefore; + side_type_[0]=sidebefore; } int -WidthPoint::get_cup_type_after() +WidthPoint::get_side_type_after() { - return cup_type_[1]; + return side_type_[1]; } void -WidthPoint::set_cup_type_after(int cupafter) +WidthPoint::set_side_type_after(int sideafter) { - cup_type_[1]=cupafter; + side_type_[1]=sideafter; } int -WidthPoint::get_cup_type(int i) +WidthPoint::get_side_type(int i) { - return i>0? cup_type_[1]: cup_type_[0]; + return i>0? side_type_[1]: side_type_[0]; } diff --git a/synfig-core/src/synfig/widthpoint.h b/synfig-core/src/synfig/widthpoint.h index 4a13d07..b1eb5fd 100644 --- a/synfig-core/src/synfig/widthpoint.h +++ b/synfig-core/src/synfig/widthpoint.h @@ -44,21 +44,21 @@ class WidthPoint : public UniqueID private: Real position_; Real width_; - int cup_type_[2]; // Before [0] and After[1] cup types + int side_type_[2]; // Before [0] and After[1] side types public: - enum CupType + enum SideType { - CUPTYPE_INTERPOLATE =0, - CUPTYPE_ROUNDED =1, - CUPTYPE_SQUARED =2, - CUPTYPE_PEAK =3 + TYPE_INTERPOLATE =0, + TYPE_ROUNDED =1, + TYPE_SQUARED =2, + TYPE_PEAK =3 }; WidthPoint(); - WidthPoint(Real position, Real width, int cupbefore=CUPTYPE_INTERPOLATE, - int cupafter=CUPTYPE_INTERPOLATE); + WidthPoint(Real position, Real width, int sidebefore=TYPE_INTERPOLATE, + int sideafter=TYPE_INTERPOLATE); const Real& get_position()const; void set_position(const Real& x); @@ -68,11 +68,11 @@ public: const Real& get_width()const; void set_width(Real x); - int get_cup_type_before(); - void set_cup_type_before(int cupbefore); - int get_cup_type_after(); - void set_cup_type_after(int cupafter); - int get_cup_type(int i); + int get_side_type_before(); + void set_side_type_before(int sidebefore); + int get_side_type_after(); + void set_side_type_after(int sideafter); + int get_side_type(int i); bool operator < (const WidthPoint& rhs) { return position_ < rhs.position_; } }; // END of class WidthPoint ------------------------------------------------------------------------------ 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
