Use map of static values indexed by parameter name instead of the macros and the...
[synfig.git] / synfig-core / src / modules / mod_geometry / circle.cpp
index dcf8cef..6721ad4 100644 (file)
@@ -66,15 +66,11 @@ Circle::Circle():
        radius                  (1),
        feather                 (0),
        invert                  (false),
-       falloff                 (FALLOFF_INTERPOLATION_LINEAR),
-       color_static    (false),
-       origin_static   (false),
-       radius_static   (false),
-       feather_static  (false),
-       invert_static   (true),
-       falloff_static  (true)
+       falloff                 (FALLOFF_INTERPOLATION_LINEAR)
 {
        constructcache();
+       Layer::Vocab voc(get_param_vocab());
+       Layer::fill_static(voc);
 }
 
 bool
@@ -126,34 +122,6 @@ Circle::get_param(const String &param)const
 bool
 Circle::set_param_static(const String &param, const bool x)
 {
-
-       if(param=="color" && color_static!=x)
-       {
-               color_static=x;
-               return true;
-       }
-       if(param=="radius" && radius_static!=x)
-       {
-               radius_static=x;
-               return true;
-       }
-
-       if(param=="origin" && origin_static!=x)
-       {
-               origin_static=x;
-               return true;
-       }
-       if(param=="feather" && feather_static!=x)
-       {
-               feather_static=x;
-               return true;
-       }
-       if(param=="falloff" && falloff_static!=x)
-       {
-               falloff_static=x;
-               return true;
-       }
-
        return Layer_Composite::set_param_static(param, x);
 }
 
@@ -161,18 +129,6 @@ Circle::set_param_static(const String &param, const bool x)
 bool
 Circle::get_param_static(const String &param) const
 {
-
-       if(param=="color")
-               return color_static;
-       if(param=="radius")
-               return radius_static;
-       if(param=="origin")
-               return origin_static;
-       if(param=="feather")
-               return feather_static;
-       if(param=="falloff")
-               return falloff_static;
-
        return Layer_Composite::get_param_static(param);
 }