X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fvaluenode_repeat_gradient.cpp;h=fbac8229bc6b4e396389785b65994c1f009fbfd4;hb=f1853221eb20d3c9a8bd72d4fd16f3cea436c894;hp=44f576c3a5caef182de3bd82eec203b95ed42de9;hpb=b37086823c5bfee9c76f6b265584a414100963ef;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/valuenode_repeat_gradient.cpp b/synfig-core/trunk/src/synfig/valuenode_repeat_gradient.cpp index 44f576c..fbac822 100644 --- a/synfig-core/trunk/src/synfig/valuenode_repeat_gradient.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_repeat_gradient.cpp @@ -78,7 +78,7 @@ ValueNode_Repeat_Gradient::create(const ValueBase& x) if(id!=ValueBase::TYPE_GRADIENT) { assert(0); - throw runtime_error("synfig::ValueNode_Repeat_Gradient:Bad type "+ValueBase::type_name(id)); + throw runtime_error(String(_("Repeat Gradient"))+_(":Bad type ")+ValueBase::type_local_name(id)); } ValueNode_Repeat_Gradient* value_node=new ValueNode_Repeat_Gradient(x.get(Gradient())); @@ -93,73 +93,6 @@ synfig::ValueNode_Repeat_Gradient::~ValueNode_Repeat_Gradient() unlink_all(); } -bool -synfig::ValueNode_Repeat_Gradient::set_gradient(ValueNode::Handle a) -{ - if(a->get_type()!=ValueBase::TYPE_GRADIENT) - return false; - - gradient_=a; - - return true; -} - -bool -synfig::ValueNode_Repeat_Gradient::set_width(ValueNode::Handle x) -{ - if(x->get_type()!=ValueBase::TYPE_REAL) - return false; - - width_=x; - - return true; -} - -bool -synfig::ValueNode_Repeat_Gradient::set_count(ValueNode::Handle b) -{ - if(b->get_type()!=ValueBase::TYPE_INTEGER) - return false; - count_=b; - return true; -} - -bool -synfig::ValueNode_Repeat_Gradient::set_specify_start(ValueNode::Handle a) -{ - if(a->get_type()!=ValueBase::TYPE_BOOL) - return false; - specify_start_=a; - return true; -} - -bool -synfig::ValueNode_Repeat_Gradient::set_specify_end(ValueNode::Handle a) -{ - if(a->get_type()!=ValueBase::TYPE_BOOL) - return false; - specify_end_=a; - return true; -} - -bool -synfig::ValueNode_Repeat_Gradient::set_start_color(ValueNode::Handle a) -{ - if(a->get_type()!=ValueBase::TYPE_COLOR) - return false; - start_color_=a; - return true; -} - -bool -synfig::ValueNode_Repeat_Gradient::set_end_color(ValueNode::Handle a) -{ - if(a->get_type()!=ValueBase::TYPE_COLOR) - return false; - end_color_=a; - return true; -} - synfig::ValueBase synfig::ValueNode_Repeat_Gradient::operator()(Time t)const { @@ -199,34 +132,20 @@ synfig::ValueNode_Repeat_Gradient::operator()(Time t)const } bool -ValueNode_Repeat_Gradient::set_link_vfunc(int i,ValueNode::Handle x) +ValueNode_Repeat_Gradient::set_link_vfunc(int i,ValueNode::Handle value) { assert(i>=0 && i=0 && i=0 && i=0 && i