00001 /* === S Y N F I G ========================================================= */ 00022 /* ========================================================================= */ 00023 00024 /* === H E A D E R S ======================================================= */ 00025 00026 #ifndef __SYNFIG_LAYER_SHADE_H__ 00027 #define __SYNFIG_LAYER_SHADE_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/blur.h> 00035 00036 using namespace synfig; 00037 using namespace std; 00038 using namespace etl; 00039 00040 class Layer_Shade : public synfig::Layer_Composite 00041 { 00042 SYNFIG_LAYER_MODULE_EXT 00043 private: 00044 synfig::Vector size; 00045 int type; 00046 synfig::Color color; 00047 synfig::Vector origin; 00048 bool invert; 00049 00050 public: 00051 Layer_Shade(); 00052 00053 virtual bool set_param(const String & param, const synfig::ValueBase &value); 00054 00055 virtual ValueBase get_param(const String & param)const; 00056 00057 virtual Color get_color(Context context, const Point &pos)const; 00058 00059 virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; 00060 virtual Rect get_full_bounding_rect(Context context)const; 00061 virtual Vocab get_param_vocab()const; 00062 virtual bool reads_context()const { return true; } 00063 }; // END of class Layer_Shade 00064 00065 /* -- E X T E R N S --------------------------------------------------------- */ 00066 00067 /* -- E N D ----------------------------------------------------------------- */ 00068 00069 #endif