From: dooglus Date: Wed, 23 Jan 2008 17:41:02 +0000 (+0000) Subject: Define reads_context() in the class of each layer that does need to be able to see... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;ds=sidebyside;h=41e5abd07c8bbe9a8195950cea87f0756db594a0;hp=b82a781c2bb8dc8cad09ea94beebf6053827acb9;p=synfig.git Define reads_context() in the class of each layer that does need to be able to see its own context. git-svn-id: http://svn.voria.com/code@1431 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/modules/lyr_std/bevel.h b/synfig-core/trunk/src/modules/lyr_std/bevel.h index 8b1965a..59a524d 100644 --- a/synfig-core/trunk/src/modules/lyr_std/bevel.h +++ b/synfig-core/trunk/src/modules/lyr_std/bevel.h @@ -70,7 +70,8 @@ public: virtual synfig::Rect get_full_bounding_rect(Context context)const; virtual Vocab get_param_vocab()const; -}; // END of class Blur + virtual bool reads_context()const { return true; } +}; // END of class Layer_Bevel /* -- E X T E R N S --------------------------------------------------------- */ diff --git a/synfig-core/trunk/src/modules/lyr_std/shade.h b/synfig-core/trunk/src/modules/lyr_std/shade.h index 15c23e3..537a883 100644 --- a/synfig-core/trunk/src/modules/lyr_std/shade.h +++ b/synfig-core/trunk/src/modules/lyr_std/shade.h @@ -57,9 +57,9 @@ public: virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; virtual Rect get_full_bounding_rect(Context context)const; - virtual Vocab get_param_vocab()const; -}; // END of class Blur + virtual bool reads_context()const { return true; } +}; // END of class Layer_Shade /* -- E X T E R N S --------------------------------------------------------- */ diff --git a/synfig-core/trunk/src/modules/lyr_std/twirl.h b/synfig-core/trunk/src/modules/lyr_std/twirl.h index 6c1fe77..db1d3ef 100644 --- a/synfig-core/trunk/src/modules/lyr_std/twirl.h +++ b/synfig-core/trunk/src/modules/lyr_std/twirl.h @@ -75,6 +75,7 @@ public: virtual Vocab get_param_vocab()const; virtual etl::handle get_transform()const; + virtual bool reads_context()const { return true; } }; // END of class Twirl /* === E N D =============================================================== */ diff --git a/synfig-core/trunk/src/modules/mod_filter/blur.h b/synfig-core/trunk/src/modules/mod_filter/blur.h index 6dd8773..bfa0b84 100644 --- a/synfig-core/trunk/src/modules/mod_filter/blur.h +++ b/synfig-core/trunk/src/modules/mod_filter/blur.h @@ -56,6 +56,8 @@ public: virtual synfig::Rect get_full_bounding_rect(Context context)const; virtual Vocab get_param_vocab()const; + + virtual bool reads_context()const { return true; } }; // END of class Blur /* -- E X T E R N S --------------------------------------------------------- */ diff --git a/synfig-core/trunk/src/modules/mod_filter/halftone2.h b/synfig-core/trunk/src/modules/mod_filter/halftone2.h index 5e0f46d..9924776 100644 --- a/synfig-core/trunk/src/modules/mod_filter/halftone2.h +++ b/synfig-core/trunk/src/modules/mod_filter/halftone2.h @@ -64,9 +64,9 @@ public: virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; - virtual Vocab get_param_vocab()const; -}; + virtual bool reads_context()const { return true; } +}; // END of class Halftone2 /* === E N D =============================================================== */ diff --git a/synfig-core/trunk/src/modules/mod_filter/halftone3.h b/synfig-core/trunk/src/modules/mod_filter/halftone3.h index 60b07b1..e998616 100644 --- a/synfig-core/trunk/src/modules/mod_filter/halftone3.h +++ b/synfig-core/trunk/src/modules/mod_filter/halftone3.h @@ -69,9 +69,9 @@ public: virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; - virtual Vocab get_param_vocab()const; -}; + virtual bool reads_context()const { return true; } +}; // END of class Halftone3 /* === E N D =============================================================== */ diff --git a/synfig-core/trunk/src/modules/mod_filter/lumakey.h b/synfig-core/trunk/src/modules/mod_filter/lumakey.h index 3e53833..a52ce3a 100644 --- a/synfig-core/trunk/src/modules/mod_filter/lumakey.h +++ b/synfig-core/trunk/src/modules/mod_filter/lumakey.h @@ -59,7 +59,8 @@ public: virtual synfig::Rect get_bounding_rect(synfig::Context context)const; virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; -}; + virtual bool reads_context()const { return true; } +}; // END of class LumaKey /* === E N D =============================================================== */ diff --git a/synfig-core/trunk/src/modules/mod_filter/radialblur.h b/synfig-core/trunk/src/modules/mod_filter/radialblur.h index c283323..e7ab843 100644 --- a/synfig-core/trunk/src/modules/mod_filter/radialblur.h +++ b/synfig-core/trunk/src/modules/mod_filter/radialblur.h @@ -61,7 +61,8 @@ public: 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; virtual Vocab get_param_vocab()const; -}; + virtual bool reads_context()const { return true; } +}; // END of class RadialBlur /* === E N D =============================================================== */ diff --git a/synfig-core/trunk/src/modules/mod_noise/distort.h b/synfig-core/trunk/src/modules/mod_noise/distort.h index 3d41722..3958c2b 100644 --- a/synfig-core/trunk/src/modules/mod_noise/distort.h +++ b/synfig-core/trunk/src/modules/mod_noise/distort.h @@ -73,9 +73,9 @@ public: virtual void set_time(synfig::Context context, synfig::Time time)const; virtual void set_time(synfig::Context context, synfig::Time time, const synfig::Point &point)const; virtual synfig::Rect get_bounding_rect(synfig::Context context)const; - virtual Vocab get_param_vocab()const; -}; + virtual bool reads_context()const { return true; } +}; // EOF of class NoiseDistort /* === E N D =============================================================== */ diff --git a/synfig-core/trunk/src/synfig/layer_duplicate.h b/synfig-core/trunk/src/synfig/layer_duplicate.h index 3c29b23..4740a9f 100644 --- a/synfig-core/trunk/src/synfig/layer_duplicate.h +++ b/synfig-core/trunk/src/synfig/layer_duplicate.h @@ -50,23 +50,15 @@ public: //! Duplicates the Layer virtual Layer::Handle clone(const GUID& deriv_guid=GUID())const; - virtual bool set_param(const String & param, const synfig::ValueBase &value); - virtual ValueBase get_param(const String & param)const; - virtual Color get_color(Context context, const Point &pos)const; - virtual void set_time(Context context, Time time)const; - virtual void set_time(Context context, Time time, const Point &point)const; - virtual ValueNode_Duplicate::Handle get_duplicate_param()const; - virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; - virtual Vocab get_param_vocab()const; - + virtual bool reads_context()const { return true; } }; // END of class Layer_Duplicate }; // END of namespace synfig diff --git a/synfig-core/trunk/src/synfig/layer_motionblur.h b/synfig-core/trunk/src/synfig/layer_motionblur.h index b1328e6..08083b0 100644 --- a/synfig-core/trunk/src/synfig/layer_motionblur.h +++ b/synfig-core/trunk/src/synfig/layer_motionblur.h @@ -39,29 +39,19 @@ class Layer_MotionBlur : public synfig::Layer_Composite SYNFIG_LAYER_MODULE_EXT private: - Time aperture; - mutable Time time_cur; public: - Layer_MotionBlur(); - virtual bool set_param(const String & param, const synfig::ValueBase &value); - virtual ValueBase get_param(const String & param)const; - virtual Color get_color(Context context, const Point &pos)const; - virtual void set_time(Context context, Time time)const; - virtual void set_time(Context context, Time time, const Point &point)const; - virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; - virtual Vocab get_param_vocab()const; - + virtual bool reads_context()const { return true; } }; // END of class Layer_MotionBlur }; // END of namespace synfig