00001
00026
00027
00028 #ifndef __SYNFIG_CURVEWARP_H
00029 #define __SYNFIG_CURVEWARP_H
00030
00031
00032
00033 #include <vector>
00034 #include <synfig/vector.h>
00035 #include <synfig/layer.h>
00036 #include <synfig/blinepoint.h>
00037
00038
00039
00040
00041
00042
00043
00044 using namespace synfig;
00045 using namespace std;
00046 using namespace etl;
00047
00048 class CurveWarp : public Layer
00049 {
00050 SYNFIG_LAYER_MODULE_EXT
00051
00052 private:
00053 std::vector<synfig::BLinePoint> bline;
00054
00055 Point origin;
00056 Real perp_width;
00057 Point start_point;
00058 Point end_point;
00059 Real curve_length_;
00060 Vector perp_;
00061 bool fast;
00062
00063 void sync();
00064
00065 public:
00066 CurveWarp();
00067
00068 virtual bool set_param(const String ¶m, const ValueBase &value);
00069 virtual ValueBase get_param(const String ¶m)const;
00070 virtual Point transform(const Point &point_, Real *dist=NULL, Real *along=0, int quality=10)const;
00071 virtual Color get_color(Context context, const Point &pos)const;
00072 virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const;
00073 synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const;
00074
00075 virtual Vocab get_param_vocab()const;
00076 };
00077
00078
00079
00080 #endif