From fcb0bf8283d86e4103811ff43a2cf9f31b5de1a8 Mon Sep 17 00:00:00 2001 From: dooglus Date: Thu, 6 Mar 2008 20:38:22 +0000 Subject: [PATCH] Don't allow negative feather parameters for circles (or for the example 'filled rect' layer). git-svn-id: http://svn.voria.com/code@1865 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/modules/example/filledrect.cpp | 4 ++-- synfig-core/trunk/src/modules/mod_geometry/circle.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/synfig-core/trunk/src/modules/example/filledrect.cpp b/synfig-core/trunk/src/modules/example/filledrect.cpp index 57e03ab..3aec7d5 100644 --- a/synfig-core/trunk/src/modules/example/filledrect.cpp +++ b/synfig-core/trunk/src/modules/example/filledrect.cpp @@ -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); diff --git a/synfig-core/trunk/src/modules/mod_geometry/circle.cpp b/synfig-core/trunk/src/modules/mod_geometry/circle.cpp index 4c38f45..db2983d 100644 --- a/synfig-core/trunk/src/modules/mod_geometry/circle.cpp +++ b/synfig-core/trunk/src/modules/mod_geometry/circle.cpp @@ -78,7 +78,7 @@ Circle::ImportParameters(const String ¶m, 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); -- 2.7.4