00001 /* === S Y N F I G ========================================================= */ 00022 /* ========================================================================= */ 00023 00024 /* === S T A R T =========================================================== */ 00025 00026 #ifndef __SYNFIG_TIMELOOP_H 00027 #define __SYNFIG_TIMELOOP_H 00028 00029 /* === H E A D E R S ======================================================= */ 00030 00031 #include <synfig/layer.h> 00032 #include <synfig/color.h> 00033 #include <synfig/time.h> 00034 #include <synfig/context.h> 00035 00036 /* === M A C R O S ========================================================= */ 00037 00038 /* === T Y P E D E F S ===================================================== */ 00039 00040 /* === C L A S S E S & S T R U C T S ======================================= */ 00041 00042 class Layer_TimeLoop : public synfig::Layer 00043 { 00044 SYNFIG_LAYER_MODULE_EXT 00045 00046 private: 00047 synfig::Time link_time; 00048 synfig::Time local_time; 00049 synfig::Time duration; 00050 00051 synfig::Time start_time; 00052 synfig::Time end_time; 00053 bool old_version; 00054 bool only_for_positive_duration; 00055 bool symmetrical; // the 0.1 version of this layer behaved differently before 'start_time' was reached 00056 00057 protected: 00058 Layer_TimeLoop(); 00059 00060 public: 00061 ~Layer_TimeLoop(); 00062 00063 virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); 00064 00065 virtual synfig::ValueBase get_param(const synfig::String & param)const; 00066 00067 virtual Vocab get_param_vocab()const; 00068 virtual bool set_version(const synfig::String &ver); 00069 virtual void reset_version(); 00070 virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; 00071 00072 virtual void set_time(synfig::Context context, synfig::Time time)const; 00073 virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; 00074 }; 00075 00076 /* === E N D =============================================================== */ 00077 00078 #endif