00001 /* === S Y N F I G ========================================================= */ 00021 /* ========================================================================= */ 00022 00023 /* === S T A R T =========================================================== */ 00024 00025 #ifndef __SYNFIG_OUTLINE_H 00026 #define __SYNFIG_OUTLINE_H 00027 00028 /* === H E A D E R S ======================================================= */ 00029 00030 #include <list> 00031 #include <vector> 00032 #include <synfig/layer_polygon.h> 00033 #include <synfig/segment.h> 00034 #include <synfig/value.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 using namespace synfig; 00043 using namespace std; 00044 using namespace etl; 00045 00046 class Outline : public synfig::Layer_Polygon 00047 { 00048 SYNFIG_LAYER_MODULE_EXT 00049 private: 00050 00051 synfig::ValueBase bline; 00052 00053 std::vector<synfig::Segment> segment_list; 00054 std::vector<synfig::Real> width_list; 00055 00056 bool round_tip[2]; 00057 00058 bool sharp_cusps; 00059 00060 bool loop_; 00061 00062 synfig::Real width; 00063 00064 synfig::Real expand; 00065 00066 Real loopyness; 00067 bool old_version; 00068 00069 bool needs_sync; 00070 00071 bool homogeneous_width; 00072 00073 public: 00074 00075 Outline(); 00076 00078 void sync(); 00079 00080 virtual bool set_param(const String & param, const synfig::ValueBase &value); 00081 00082 virtual ValueBase get_param(const String & param)const; 00083 00084 virtual Vocab get_param_vocab()const; 00085 virtual void set_time(Context context, Time time)const; 00086 virtual void set_time(Context context, Time time, Vector pos)const; 00087 virtual bool set_version(const String &ver){if(ver=="0.1")old_version=true; return true;} 00088 virtual void reset_version(){old_version=false;} 00089 00090 }; 00091 00092 /* === E N D =============================================================== */ 00093 00094 #endif