marked stable
[synfig.git] / synfig-core / tags / stable / src / modules / lyr_std / rotate.h
1 /*! ========================================================================
2 ** Sinfg
3 ** Template Header File
4 ** $Id: rotate.h,v 1.2 2005/01/24 05:00:18 darco Exp $
5 **
6 ** Copyright (c) 2002 Robert B. Quattlebaum Jr.
7 **
8 ** This software and associated documentation
9 ** are CONFIDENTIAL and PROPRIETARY property of
10 ** the above-mentioned copyright holder.
11 **
12 ** You may not copy, print, publish, or in any
13 ** other way distribute this software without
14 ** a prior written agreement with
15 ** the copyright holder.
16 **
17 ** === N O T E S ===========================================================
18 **
19 ** ========================================================================= */
20
21 /* === S T A R T =========================================================== */
22
23 #ifndef __SINFG_ROTATE_H
24 #define __SINFG_ROTATE_H
25
26 /* === H E A D E R S ======================================================= */
27
28 #include <sinfg/vector.h>
29 #include <sinfg/angle.h>
30 #include <sinfg/layer.h>
31
32 /* === M A C R O S ========================================================= */
33
34 /* === T Y P E D E F S ===================================================== */
35
36 /* === C L A S S E S & S T R U C T S ======================================= */
37
38 using namespace sinfg;
39 using namespace std;
40 using namespace etl;
41 class Rotate_Trans;
42
43 class Rotate : public Layer
44 {
45         SINFG_LAYER_MODULE_EXT
46         friend class Rotate_Trans;
47 private:
48         Vector origin;
49         Angle amount;
50         
51         Real sin_val;
52         Real cos_val;
53 public:
54         Rotate();
55         ~Rotate();
56         
57         virtual bool set_param(const sinfg::String & param, const sinfg::ValueBase &value);
58         virtual ValueBase get_param(const sinfg::String & param)const;
59         virtual Color get_color(Context context, const Point &pos)const;
60         virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const;
61         sinfg::Layer::Handle hit_check(sinfg::Context context, const sinfg::Point &point)const; 
62         virtual Vocab get_param_vocab()const;   
63         virtual Rect get_full_bounding_rect(Context context)const;
64
65         virtual etl::handle<sinfg::Transform> get_transform()const;
66 };
67
68 /* === E N D =============================================================== */
69
70 #endif