00001 /* === S Y N F I G ========================================================= */ 00022 /* ========================================================================= */ 00023 00024 /* === H E A D E R S ======================================================= */ 00025 00026 #ifndef __SYNFIG_LAYER_BEVEL_H__ 00027 #define __SYNFIG_LAYER_BEVEL_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 #include <synfig/angle.h> 00036 00037 using namespace synfig; 00038 using namespace std; 00039 using namespace etl; 00040 00041 class Layer_Bevel : public synfig::Layer_Composite 00042 { 00043 SYNFIG_LAYER_MODULE_EXT 00044 private: 00045 synfig::Real softness; 00046 int type; 00047 00048 synfig::Color color1; 00049 synfig::Color color2; 00050 00051 synfig::Angle angle; 00052 synfig::Real depth; 00053 00054 synfig::Vector offset; 00055 synfig::Vector offset45; 00056 00057 bool use_luma; 00058 bool solid; 00059 00060 void calc_offset(); 00061 public: 00062 Layer_Bevel(); 00063 00064 virtual bool set_param(const String & param, const synfig::ValueBase &value); 00065 00066 virtual ValueBase get_param(const String & param)const; 00067 00068 virtual Color get_color(Context context, const Point &pos)const; 00069 00070 virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; 00071 00072 virtual synfig::Rect get_full_bounding_rect(Context context)const; 00073 virtual Vocab get_param_vocab()const; 00074 virtual bool reads_context()const { return true; } 00075 }; // END of class Layer_Bevel 00076 00077 /* -- E X T E R N S --------------------------------------------------------- */ 00078 00079 /* -- E N D ----------------------------------------------------------------- */ 00080 00081 #endif