Don't allow negative feather parameters for circles (or for the example 'filled rect...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Thu, 6 Mar 2008 20:38:22 +0000 (20:38 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Thu, 6 Mar 2008 20:38:22 +0000 (20:38 +0000)
git-svn-id: http://svn.voria.com/code@1865 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/src/modules/example/filledrect.cpp
synfig-core/trunk/src/modules/mod_geometry/circle.cpp

index 57e03ab..3aec7d5 100644 (file)
@@ -82,8 +82,8 @@ FilledRect::set_param(const String & param, const ValueBase &value)
        IMPORT(color);
        IMPORT(point1);
        IMPORT(point2);
-       IMPORT(feather_x);
-       IMPORT(feather_y);
+       IMPORT_PLUS(feather_x, if(feather_x<0)feather_x=0;);
+       IMPORT_PLUS(feather_y, if(feather_y<0)feather_y=0;);
        IMPORT(bevel);
        IMPORT(bevCircle);
 
index 4c38f45..db2983d 100644 (file)
@@ -78,7 +78,7 @@ Circle::ImportParameters(const String &param, const ValueBase &value)
                                        set_blend_method(Color::BLEND_ALPHA_OVER);
                                        color.set_a(1); } else transparent_color_ = true; } });
        IMPORT(radius);
-       IMPORT(feather);
+       IMPORT_PLUS(feather, if(feather<0)feather=0;);
        IMPORT(invert);
        IMPORT(pos);
        IMPORT(falloff);