X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fvaluenode_stripes.cpp;h=424a73d7ab19dbdec45cd5a95bbb5eee387ff1bb;hb=756c0d29ac1742f231e6615f9a577e574e35a4af;hp=94aeef0fbe6658a65b9841f1743c38e6a7f5aa34;hpb=5ddcf36f04cfbd10fabda4e3c5633cb27cdd4c0a;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/valuenode_stripes.cpp b/synfig-core/trunk/src/synfig/valuenode_stripes.cpp index 94aeef0..424a73d 100644 --- a/synfig-core/trunk/src/synfig/valuenode_stripes.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_stripes.cpp @@ -1,11 +1,12 @@ /* === S Y N F I G ========================================================= */ -/*! \file valuenode_subtract.cpp -** \brief Template File +/*! \file valuenode_stripes.cpp +** \brief Implementation of the "Stripes" valuenode conversion. ** -** $Id: valuenode_stripes.cpp,v 1.1.1.1 2005/01/04 01:23:15 darco Exp $ +** $Id$ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 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 @@ -74,7 +75,7 @@ ValueNode_Stripes::create(const ValueBase& x) if(id!=ValueBase::TYPE_GRADIENT) { assert(0); - throw runtime_error("synfig::ValueNode_Stripes:Bad type "+ValueBase::type_name(id)); + throw runtime_error(String(_("Stripes"))+_(":Bad type ")+ValueBase::type_local_name(id)); } ValueNode_Stripes* value_node=new ValueNode_Stripes(); @@ -89,48 +90,6 @@ synfig::ValueNode_Stripes::~ValueNode_Stripes() unlink_all(); } -bool -synfig::ValueNode_Stripes::set_color1(ValueNode::Handle a) -{ - if(a->get_type()!=ValueBase::TYPE_COLOR) - return false; - - color1_=a; - - return true; -} - -bool -synfig::ValueNode_Stripes::set_color2(ValueNode::Handle a) -{ - if(a->get_type()!=ValueBase::TYPE_COLOR) - return false; - - color2_=a; - - return true; -} - -bool -synfig::ValueNode_Stripes::set_width(ValueNode::Handle x) -{ - if(x->get_type()!=ValueBase::TYPE_REAL) - return false; - - width_=x; - - return true; -} - -bool -synfig::ValueNode_Stripes::set_stripes(ValueNode::Handle b) -{ - if(b->get_type()!=ValueBase::TYPE_INTEGER) - return false; - stripes_=b; - return true; -} - synfig::ValueBase synfig::ValueNode_Stripes::operator()(Time t)const { @@ -161,25 +120,17 @@ synfig::ValueNode_Stripes::operator()(Time t)const } bool -ValueNode_Stripes::set_link_vfunc(int i,ValueNode::Handle x) +ValueNode_Stripes::set_link_vfunc(int i,ValueNode::Handle value) { assert(i>=0 && i=0 && i=0 && i=0 && i