00001
00022
00023
00024
00025
00026 #ifndef __SYNFIG_HALFTONE2_H
00027 #define __SYNFIG_HALFTONE2_H
00028
00029
00030
00031 #include <synfig/vector.h>
00032 #include <synfig/valuenode.h>
00033 #include <synfig/layer_composite.h>
00034 #include <synfig/time.h>
00035 #include <synfig/angle.h>
00036 #include "halftone.h"
00037
00038
00039
00040
00041
00042
00043
00044 class Halftone2 : public synfig::Layer_Composite
00045 {
00046 SYNFIG_LAYER_MODULE_EXT
00047
00048 private:
00049
00050 Halftone halftone;
00051 synfig::Color color_dark;
00052 synfig::Color color_light;
00053
00054 synfig::Color color_func(const synfig::Point &x, float supersample,const synfig::Color &under_color)const;
00055
00056 float calc_supersample(const synfig::Point &x, float pw,float ph)const;
00057
00058
00059
00060 public:
00061 Halftone2();
00062
00063 virtual bool set_param(const synfig::String ¶m, const synfig::ValueBase &value);
00064 virtual synfig::ValueBase get_param(const synfig::String ¶m)const;
00065 virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const;
00066 virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const;
00067 synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const;
00068 virtual Vocab get_param_vocab()const;
00069 virtual bool reads_context()const { return true; }
00070 };
00071
00072
00073
00074 #endif