X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fvaluenode_stripes.cpp;h=77a337fa34ade6f7a10177f700e027d79e2b33fb;hb=75a589f5db5821fc10dd67941e4ca587b32a69d0;hp=8fcd924a5030665602f00834b097424cbaa8c6ff;hpb=e8a065f2385c219c511b57dac52786120bfa097d;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/valuenode_stripes.cpp b/synfig-core/trunk/src/synfig/valuenode_stripes.cpp index 8fcd924..77a337f 100644 --- a/synfig-core/trunk/src/synfig/valuenode_stripes.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_stripes.cpp @@ -1,8 +1,8 @@ /* === S Y N F I G ========================================================= */ -/*! \file valuenode_subtract.cpp +/*! \file valuenode_stripes.cpp ** \brief Template File ** -** $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 @@ -70,17 +70,17 @@ ValueNode_Stripes* ValueNode_Stripes::create(const ValueBase& x) { ValueBase::Type id(x.get_type()); - + if(id!=ValueBase::TYPE_GRADIENT) { assert(0); - throw runtime_error("synfig::ValueNode_Stripes:Bad type "+ValueBase::type_name(id)); - } + throw runtime_error("synfig::ValueNode_Stripes:Bad type "+ValueBase::type_name(id)); + } ValueNode_Stripes* value_node=new ValueNode_Stripes(); assert(value_node->get_type()==id); - + return value_node; } @@ -134,7 +134,7 @@ synfig::ValueNode_Stripes::set_stripes(ValueNode::Handle b) synfig::ValueBase synfig::ValueNode_Stripes::operator()(Time t)const { - const int total((*stripes_)(t).get(int())); + const int total((*stripes_)(t).get(int())); int i; Gradient ret; @@ -144,10 +144,10 @@ synfig::ValueNode_Stripes::operator()(Time t)const const Color color1((*color1_)(t).get(Color())); const Color color2((*color2_)(t).get(Color())); const float width(max(0.0,min(1.0,(*width_)(t).get(Real())))); - + const float stripe_width_a(width/total); const float stripe_width_b((1.0-width)/total); - + for(i=0;i