From: Carlos Lopez Date: Thu, 26 Aug 2010 16:17:57 +0000 (+0200) Subject: Allow static option for the Blur Layer parameters X-Git-Url: https://git.pterodactylus.net/?p=synfig.git;a=commitdiff_plain;h=395ddd4089edf7d028b27815ca41953227884930 Allow static option for the Blur Layer parameters --- diff --git a/synfig-core/src/modules/mod_filter/blur.cpp b/synfig-core/src/modules/mod_filter/blur.cpp index f3af3ea..5ef3567 100644 --- a/synfig-core/src/modules/mod_filter/blur.cpp +++ b/synfig-core/src/modules/mod_filter/blur.cpp @@ -80,7 +80,9 @@ inline void clamp(synfig::Vector &v) Blur_Layer::Blur_Layer(): Layer_Composite(1.0,Color::BLEND_STRAIGHT), size(0.1,0.1), - type(Blur::FASTGAUSSIAN) + type(Blur::FASTGAUSSIAN), + size_static(false), + type_static(true) { } @@ -105,6 +107,27 @@ Blur_Layer::get_param(const String ¶m)const return Layer_Composite::get_param(param); } +bool +Blur_Layer::set_param_static(const String ¶m, const bool x) +{ + + SET_STATIC(size, x) + SET_STATIC(type, x) + + return Layer_Composite::set_param_static(param, x); +} + +bool +Blur_Layer::get_param_static(const String ¶m)const +{ + + GET_STATIC(size) + GET_STATIC(type) + + return Layer_Composite::get_param_static(param); +} + + Color Blur_Layer::get_color(Context context, const Point &pos)const { diff --git a/synfig-core/src/modules/mod_filter/blur.h b/synfig-core/src/modules/mod_filter/blur.h index cfe8a2f..c51946f 100644 --- a/synfig-core/src/modules/mod_filter/blur.h +++ b/synfig-core/src/modules/mod_filter/blur.h @@ -44,6 +44,9 @@ private: synfig::Point size; int type; + bool size_static; + bool type_static; + public: Blur_Layer(); @@ -51,6 +54,9 @@ public: virtual ValueBase get_param(const String & param)const; + virtual bool set_param_static(const String ¶m, const bool x); + virtual bool get_param_static(const String ¶m) const; + virtual Color get_color(Context context, const Point &pos)const; virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const;