From 2f2b6c3d445e2e7850334a90b2ac3d3e57bec0f0 Mon Sep 17 00:00:00 2001 From: dooglus Date: Tue, 11 Sep 2007 20:07:59 +0000 Subject: [PATCH] Added a few comments. git-svn-id: http://svn.voria.com/code@654 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/modules/mod_gradient/curvegradient.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/synfig-core/trunk/src/modules/mod_gradient/curvegradient.cpp b/synfig-core/trunk/src/modules/mod_gradient/curvegradient.cpp index 2dde697..d76d76d 100644 --- a/synfig-core/trunk/src/modules/mod_gradient/curvegradient.cpp +++ b/synfig-core/trunk/src/modules/mod_gradient/curvegradient.cpp @@ -260,7 +260,7 @@ CurveGradient::color_func(const Point &point_, int quality, float supersample)co next=find_closest(fast,bline,point,t,bline_loop,&perp_dist); perp_dist/=curve_length_; } - else + else // not perpendicular { next=find_closest(fast,bline,point,t,bline_loop); } @@ -290,7 +290,7 @@ CurveGradient::color_func(const Point &point_, int quality, float supersample)co if(quality>7) search_iterations=4; } - else + else // not perpendicular { if(quality<=6)search_iterations=7; else if(quality<=7)search_iterations=6; @@ -302,9 +302,8 @@ CurveGradient::color_func(const Point &point_, int quality, float supersample)co if (fast) t = curve.find_closest(fast, point,search_iterations); - // Calculate our values - p1=curve(t); // the closest point on the curve + p1=curve(t); // the closest point on the curve tangent=deriv(t).norm(); // the unit tangent at that point if(perpendicular) @@ -313,7 +312,7 @@ CurveGradient::color_func(const Point &point_, int quality, float supersample)co p1-=tangent*perp_dist; tangent=-tangent.perp(); } - else + else // not perpendicular // the width of the bline at the closest point on the curve thickness=(next->get_width()-iter->get_width())*t+iter->get_width(); } @@ -339,7 +338,7 @@ CurveGradient::color_func(const Point &point_, int quality, float supersample)co dist=((point_-offset)*diff-p1*diff); } } - else + else // not perpendicular { diff=tangent.perp()*thickness*width; p1-=diff*0.5; -- 2.7.4