X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fvaluenode_gradientrotate.cpp;h=642856dcf2ed2b80533a9ef9b0f55d0ca812f2da;hb=756c0d29ac1742f231e6615f9a577e574e35a4af;hp=bc03f6c3360008d4a2eaf164471079d6ee4ce5c5;hpb=87f3e2561a66b091d079e5d54d2d34843642bef9;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/valuenode_gradientrotate.cpp b/synfig-core/trunk/src/synfig/valuenode_gradientrotate.cpp index bc03f6c..642856d 100644 --- a/synfig-core/trunk/src/synfig/valuenode_gradientrotate.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_gradientrotate.cpp @@ -1,11 +1,12 @@ /* === S Y N F I G ========================================================= */ /*! \file valuenode_gradientrotate.cpp -** \brief Template File +** \brief Implementation of the "Gradient Rotate" valuenode conversion. ** ** $Id$ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -72,7 +73,7 @@ ValueNode_GradientRotate::create(const ValueBase& x) if(id!=ValueBase::TYPE_GRADIENT) { assert(0); - throw runtime_error("synfig::ValueNode_GradientRotate:Bad type "+ValueBase::type_name(id)); + throw runtime_error(String(_("Gradient Rotate"))+_(":Bad type ")+ValueBase::type_local_name(id)); } ValueNode_GradientRotate* value_node=new ValueNode_GradientRotate(x.get(Gradient())); @@ -87,26 +88,6 @@ synfig::ValueNode_GradientRotate::~ValueNode_GradientRotate() unlink_all(); } -bool -synfig::ValueNode_GradientRotate::set_gradient(ValueNode::Handle a) -{ - if(a->get_type()!=ValueBase::TYPE_GRADIENT&& !PlaceholderValueNode::Handle::cast_dynamic(a)) - return false; - - ref_gradient=a; - - return true; -} - -bool -synfig::ValueNode_GradientRotate::set_offset(ValueNode::Handle b) -{ - if(b->get_type()!=ValueBase::TYPE_REAL&& !PlaceholderValueNode::Handle::cast_dynamic(b)) - return false; - ref_offset=b; - return true; -} - synfig::ValueBase synfig::ValueNode_GradientRotate::operator()(Time t)const { @@ -121,26 +102,23 @@ synfig::ValueNode_GradientRotate::operator()(Time t)const } bool -ValueNode_GradientRotate::set_link_vfunc(int i,ValueNode::Handle x) +ValueNode_GradientRotate::set_link_vfunc(int i,ValueNode::Handle value) { - assert(i>=0 && i<3); + assert(i>=0 && i=0 && i<3); + assert(i>=0 && i=0 && i<2); + assert(i>=0 && i=0 && i<2); + assert(i>=0 && i