From cf183686fd4239895de262d0035bf2fe46b3434d Mon Sep 17 00:00:00 2001 From: dooglus Date: Mon, 17 Sep 2007 00:00:20 +0000 Subject: [PATCH] Fix a copy-paste typo when applying the 'scale' convert type to a color. Previously the red component was used for R, G, and B in the resulting value. git-svn-id: http://svn.voria.com/code@684 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/synfig/valuenode_scale.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/synfig-core/trunk/src/synfig/valuenode_scale.cpp b/synfig-core/trunk/src/synfig/valuenode_scale.cpp index ef0ac19..fdba277 100644 --- a/synfig-core/trunk/src/synfig/valuenode_scale.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_scale.cpp @@ -55,7 +55,8 @@ using namespace synfig; /* === M E T H O D S ======================================================= */ -ValueNode_Scale::ValueNode_Scale():LinkableValueNode(synfig::ValueBase::TYPE_NIL) +ValueNode_Scale::ValueNode_Scale(): + LinkableValueNode(synfig::ValueBase::TYPE_NIL) { set_scalar(1.0); } @@ -177,8 +178,8 @@ synfig::ValueNode_Scale::operator()(Time t)const Color ret((*value_node)(t).get(Color())); Real s((*scalar)(t).get(Real())); ret.set_r(ret.get_r()*s); - ret.set_g(ret.get_r()*s); - ret.set_b(ret.get_r()*s); + ret.set_g(ret.get_g()*s); + ret.set_b(ret.get_b()*s); return ret; } -- 2.7.4