From f914485e14ee9b40981817346ad0e2932d4ded1e Mon Sep 17 00:00:00 2001 From: Carlos Lopez Date: Thu, 26 Aug 2010 18:43:49 +0200 Subject: [PATCH] Allow static option for the Curve Warp Layer --- synfig-core/src/modules/lyr_std/curvewarp.cpp | 27 +++++++++++++++++++++++++++ synfig-core/src/modules/lyr_std/curvewarp.h | 8 ++++++++ 2 files changed, 35 insertions(+) diff --git a/synfig-core/src/modules/lyr_std/curvewarp.cpp b/synfig-core/src/modules/lyr_std/curvewarp.cpp index 82c213d..4e6306a 100644 --- a/synfig-core/src/modules/lyr_std/curvewarp.cpp +++ b/synfig-core/src/modules/lyr_std/curvewarp.cpp @@ -377,6 +377,33 @@ CurveWarp::get_param(const String & param)const return ValueBase(); } +bool +CurveWarp::set_param_static(const String ¶m, const bool x) +{ + + SET_STATIC(origin, x) + SET_STATIC(perp_width, x) + SET_STATIC(start_point, x) + SET_STATIC(end_point, x) + SET_STATIC(fast, x) + + return Layer::set_param_static(param, x); +} + +bool +CurveWarp::get_param_static(const String ¶m)const +{ + + GET_STATIC(origin) + GET_STATIC(perp_width) + GET_STATIC(start_point) + GET_STATIC(end_point) + GET_STATIC(fast) + + + return Layer::get_param_static(param); +} + Layer::Vocab CurveWarp::get_param_vocab()const { diff --git a/synfig-core/src/modules/lyr_std/curvewarp.h b/synfig-core/src/modules/lyr_std/curvewarp.h index a287887..cb79e8f 100644 --- a/synfig-core/src/modules/lyr_std/curvewarp.h +++ b/synfig-core/src/modules/lyr_std/curvewarp.h @@ -60,6 +60,12 @@ private: Vector perp_; bool fast; + bool origin_static; + bool perp_width_static; + bool start_point_static; + bool end_point_static; + bool fast_static; + void sync(); public: @@ -67,6 +73,8 @@ public: virtual bool set_param(const String ¶m, const ValueBase &value); virtual ValueBase get_param(const String ¶m)const; + virtual bool set_param_static(const String ¶m, const bool x); + virtual bool get_param_static(const String ¶m) const; virtual Point transform(const Point &point_, Real *dist=NULL, Real *along=0, int quality=10)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; -- 2.7.4