From 44bccb5e0f65738a88be04586da0a5f452a25fc6 Mon Sep 17 00:00:00 2001 From: dooglus Date: Fri, 23 Mar 2007 17:01:41 +0000 Subject: [PATCH] Removed unused members p1, p2, diff. git-svn-id: http://svn.voria.com/code@374 1f10aa63-cdf2-0310-b900-c93c546f37ac --- .../src/modules/mod_gradient/curvegradient.cpp | 23 ---------------------- .../trunk/src/modules/mod_gradient/curvegradient.h | 4 +--- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/synfig-core/trunk/src/modules/mod_gradient/curvegradient.cpp b/synfig-core/trunk/src/modules/mod_gradient/curvegradient.cpp index d296d4b..89b967b 100644 --- a/synfig-core/trunk/src/modules/mod_gradient/curvegradient.cpp +++ b/synfig-core/trunk/src/modules/mod_gradient/curvegradient.cpp @@ -178,17 +178,11 @@ find_closest(const std::vector& bline,const Point& p,bool lo inline void CurveGradient::sync() { - diff=(p2-p1); - const Real mag(diff.inv_mag()); - diff*=mag*mag; - curve_length_=calculate_distance(bline); } CurveGradient::CurveGradient(): - p1(1,1), - p2(-1,-1), offset(0,0), width(0.25), gradient(Color::black(), Color::white()), @@ -372,7 +366,6 @@ CurveGradient::color_func(const Point &point_, int quality, float supersample)co float CurveGradient::calc_supersample(const synfig::Point &x, float pw,float ph)const { -// return pw/(p2-p1).mag(); return pw; } @@ -391,20 +384,6 @@ CurveGradient::hit_check(synfig::Context context, const synfig::Point &point)con bool CurveGradient::set_param(const String & param, const ValueBase &value) { - if(param=="p1" && value.same_as(p1)) - { - p1=value.get(p1); - sync(); - return true; - } - if(param=="p2" && value.same_as(p2)) - { - p2=value.get(p2); - sync(); - return true; - } - //IMPORT(p1); - //IMPORT(p2); IMPORT(offset); @@ -431,8 +410,6 @@ CurveGradient::get_param(const String & param)const { EXPORT(offset); EXPORT(bline); - EXPORT(p1); - EXPORT(p2); EXPORT(gradient); EXPORT(loop); EXPORT(zigzag); diff --git a/synfig-core/trunk/src/modules/mod_gradient/curvegradient.h b/synfig-core/trunk/src/modules/mod_gradient/curvegradient.h index 28ce0e7..a70810a 100644 --- a/synfig-core/trunk/src/modules/mod_gradient/curvegradient.h +++ b/synfig-core/trunk/src/modules/mod_gradient/curvegradient.h @@ -51,12 +51,10 @@ class CurveGradient : public Layer_Composite, public Layer_NoDeform private: std::vector bline; - Point p1,p2; Point offset; Real width; - Vector diff; Gradient gradient; - Real curve_length_; + Real curve_length_; bool loop; bool zigzag; -- 2.7.4