synfig-core  1.0.3
bevel.h
Go to the documentation of this file.
1 /* === S Y N F I G ========================================================= */
23 /* ========================================================================= */
24 
25 /* === H E A D E R S ======================================================= */
26 
27 #ifndef __SYNFIG_LAYER_BEVEL_H__
28 #define __SYNFIG_LAYER_BEVEL_H__
29 
30 /* -- H E A D E R S --------------------------------------------------------- */
31 
33 #include <synfig/color.h>
34 #include <synfig/vector.h>
35 #include <synfig/blur.h>
36 #include <synfig/angle.h>
37 
38 using namespace synfig;
39 using namespace std;
40 using namespace etl;
41 
43 {
45 private:
47  ValueBase param_type;
49  ValueBase param_softness;
51  ValueBase param_color1;
53  ValueBase param_color2;
55  ValueBase param_angle;
57  ValueBase param_depth;
59  ValueBase param_use_luma;
61  ValueBase param_solid;
62 
63  synfig::Vector offset;
64  synfig::Vector offset45;
65 
66 
67  void calc_offset();
68 public:
69  Layer_Bevel();
70 
71  virtual bool set_param(const String & param, const synfig::ValueBase &value);
72 
73  virtual ValueBase get_param(const String & param)const;
74 
75  virtual Color get_color(Context context, const Point &pos)const;
76 
77  virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const;
78  virtual bool accelerated_cairorender(Context context, cairo_t *cr,int quality, const RendDesc &renddesc, ProgressCallback *cb)const;
79 
80  virtual synfig::Rect get_full_bounding_rect(Context context)const;
81  virtual Vocab get_param_vocab()const;
82  virtual bool reads_context()const { return true; }
83 }; // END of class Layer_Bevel
84 
85 /* -- E X T E R N S --------------------------------------------------------- */
86 
87 /* -- E N D ----------------------------------------------------------------- */
88 
89 #endif