00001 /* === S Y N F I G ========================================================= */ 00022 /* ========================================================================= */ 00023 00024 /* === S T A R T =========================================================== */ 00025 00026 #ifndef __SYNFIG_VALUENODE_BLINE_H 00027 #define __SYNFIG_VALUENODE_BLINE_H 00028 00029 /* === H E A D E R S ======================================================= */ 00030 00031 #include <vector> 00032 #include <list> 00033 00034 #include "valuenode.h" 00035 #include "time.h" 00036 #include "uniqueid.h" 00037 #include "blinepoint.h" 00038 #include "valuenode_dynamiclist.h" 00039 00040 /* === M A C R O S ========================================================= */ 00041 00042 /* === C L A S S E S & S T R U C T S ======================================= */ 00043 00044 namespace synfig { 00045 00046 00048 ValueBase convert_bline_to_segment_list(const ValueBase &bline); 00049 00051 ValueBase convert_bline_to_width_list(const ValueBase &bline); 00052 00054 Real find_closest_point(const ValueBase &bline, const Point &pos, Real &radius, bool loop, Point *out_point = 0); 00055 00059 class ValueNode_BLine : public ValueNode_DynamicList 00060 { 00061 public: 00062 00063 typedef etl::handle<ValueNode_BLine> Handle; 00064 typedef etl::handle<const ValueNode_BLine> ConstHandle; 00065 00066 00067 ValueNode_BLine(); 00068 00069 public: 00070 00071 00072 00073 virtual ValueBase operator()(Time t)const; 00074 00075 virtual ~ValueNode_BLine(); 00076 00077 virtual String link_local_name(int i)const; 00078 00079 virtual String get_name()const; 00080 virtual String get_local_name()const; 00081 00082 virtual ListEntry create_list_entry(int index, Time time=0, Real origin=0.5); 00083 00084 protected: 00085 00086 LinkableValueNode* create_new()const; 00087 00088 public: 00089 //using synfig::LinkableValueNode::set_link_vfunc; 00090 static bool check_type(ValueBase::Type type); 00091 static ValueNode_BLine* create(const ValueBase &x=ValueBase::TYPE_LIST); 00092 }; // END of class ValueNode_BLine 00093 00094 typedef ValueNode_BLine::ListEntry::ActivepointList ActivepointList; 00095 00096 }; // END of namespace synfig 00097 00098 /* === E N D =============================================================== */ 00099 00100 #endif