Author: Carlos Lopez <[email protected]>
Date: Tue Aug 9 13:02:43 2011 +0200
Limit to [0,1] the values of the length and offset of a dash item when
evaluating the Dash Item Value Node.
---
synfig-core/src/synfig/valuenode_composite.cpp | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/synfig-core/src/synfig/valuenode_composite.cpp
b/synfig-core/src/synfig/valuenode_composite.cpp
index 5d4ea3d..7208e82 100644
--- a/synfig-core/src/synfig/valuenode_composite.cpp
+++ b/synfig-core/src/synfig/valuenode_composite.cpp
@@ -196,8 +196,12 @@ synfig::ValueNode_Composite::operator()(Time t)const
{
DashItem ret;
assert(components[0] && components[1] && components[2]
&& components[3]);
- ret.set_offset((*components[0])(t).get(Real()));
- ret.set_length((*components[1])(t).get(Real()));
+ Real offset((*components[0])(t).get(Real()));
+ if(offset < 0.0) offset=0.0;
+ Real length((*components[1])(t).get(Real()));
+ if(length < 0.0) length=0.0;
+ ret.set_offset(offset);
+ ret.set_length(length);
ret.set_side_type_before((*components[2])(t).get(int()));
ret.set_side_type_after((*components[3])(t).get(int()));
return ret;
------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model
configuration take the hassle out of deploying and managing Subversion and
the tools developers use with it. Learn more about uberSVN and get a free
download at: http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl