marked stable
[synfig.git] / synfig-core / tags / stable / src / modules / mod_geometry / checkerboard.h
1 /*! ========================================================================
2 ** Sinfg
3 ** Checkerboard Layer
4 ** $Id: checkerboard.h,v 1.1.1.1 2005/01/04 01:23:10 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_CHECKERBOARD_H
24 #define __SINFG_CHECKERBOARD_H
25
26 /* === H E A D E R S ======================================================= */
27
28 #include <sinfg/layer_composite.h>
29 #include <sinfg/color.h>
30 #include <sinfg/vector.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 class CheckerBoard : public sinfg::Layer_Composite, public sinfg::Layer_NoDeform
39 {
40         SINFG_LAYER_MODULE_EXT
41 private:
42         sinfg::Color color;
43         sinfg::Point pos;
44         sinfg::Point size;
45
46         bool point_test(const sinfg::Point& x)const;
47
48 public:
49         CheckerBoard();
50         
51         virtual bool set_param(const sinfg::String & param, const sinfg::ValueBase &value);
52
53         virtual sinfg::ValueBase get_param(const sinfg::String & param)const;
54
55         virtual sinfg::Color get_color(sinfg::Context context, const sinfg::Point &pos)const;
56         
57         virtual Vocab get_param_vocab()const;
58
59         sinfg::Layer::Handle hit_check(sinfg::Context context, const sinfg::Point &point)const;
60
61         virtual bool accelerated_render(sinfg::Context context,sinfg::Surface *surface,int quality, const sinfg::RendDesc &renddesc, sinfg::ProgressCallback *cb)const;
62 };
63
64 /* === E N D =============================================================== */
65
66 #endif