00001 /* === S Y N F I G ========================================================= */ 00022 /* ========================================================================= */ 00023 00024 /* === S T A R T =========================================================== */ 00025 00026 #ifndef __SYNFIG_TWIRL_H 00027 #define __SYNFIG_TWIRL_H 00028 00029 /* === H E A D E R S ======================================================= */ 00030 00031 #include <synfig/layer_composite.h> 00032 #include <synfig/color.h> 00033 #include <synfig/vector.h> 00034 #include <synfig/value.h> 00035 #include <synfig/gradient.h> 00036 #include <synfig/angle.h> 00037 00038 /* === M A C R O S ========================================================= */ 00039 00040 /* === T Y P E D E F S ===================================================== */ 00041 00042 /* === C L A S S E S & S T R U C T S ======================================= */ 00043 class Twirl_Trans; 00044 00045 class Twirl : public synfig::Layer_Composite 00046 { 00047 SYNFIG_LAYER_MODULE_EXT 00048 friend class Twirl_Trans; 00049 00050 private: 00051 00052 synfig::Point center; 00053 00054 synfig::Real radius; 00055 00056 synfig::Angle rotations; 00057 00058 bool distort_inside; 00059 00060 bool distort_outside; 00061 00062 synfig::Point distort(const synfig::Point &pos, bool reverse=false)const; 00063 public: 00064 00065 Twirl(); 00066 00067 virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); 00068 00069 virtual synfig::ValueBase get_param(const synfig::String & param)const; 00070 00071 virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; 00072 00073 //virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; 00074 00075 synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; 00076 00077 virtual Vocab get_param_vocab()const; 00078 virtual etl::handle<synfig::Transform> get_transform()const; 00079 virtual bool reads_context()const { return true; } 00080 }; // END of class Twirl 00081 00082 /* === E N D =============================================================== */ 00083 00084 #endif