1 /* === S I N F G =========================================================== */
2 /*! \file layer_composite.h
3 ** \brief Composite Layer Class Implementation
5 ** $Id: layer_composite.h,v 1.2 2005/01/24 03:08:18 darco Exp $
8 ** Copyright (c) 2002 Robert B. Quattlebaum Jr.
10 ** This software and associated documentation
11 ** are CONFIDENTIAL and PROPRIETARY property of
12 ** the above-mentioned copyright holder.
14 ** You may not copy, print, publish, or in any
15 ** other way distribute this software without
16 ** a prior written agreement with
17 ** the copyright holder.
20 /* ========================================================================= */
22 /* === S T A R T =========================================================== */
24 #ifndef __SINFG_LAYER_COMPOSITE_H
25 #define __SINFG_LAYER_COMPOSITE_H
27 /* === H E A D E R S ======================================================= */
32 /* === M A C R O S ========================================================= */
34 /* === T Y P E D E F S ===================================================== */
36 /* === C L A S S E S & S T R U C T S ======================================= */
40 class Layer_NoDeform {};
43 /*! \class Layer_Composite
44 ** \brief Base class for layers that put stuff ontop of lower layers
46 class Layer_Composite : public Layer
52 Color::BlendMethod blend_method_;
58 Color::BlendMethod blend_method=Color::BLEND_COMPOSITE
61 blend_method_ (blend_method)
66 float get_amount()const { return amount_; }
68 Layer_Composite& set_amount(float x) { amount_=x; return *this; }
70 Color::BlendMethod get_blend_method()const { return blend_method_; }
72 Layer_Composite& set_blend_method(Color::BlendMethod x) { blend_method_=x; return *this; }
74 bool is_solid_color()const { return amount_==1.0f && blend_method_==Color::BLEND_STRAIGHT; }
76 bool is_disabled()const { return amount_==0.0f; }
78 virtual Vocab get_param_vocab()const;
80 virtual bool set_param(const String ¶m, const ValueBase &value);
82 virtual ValueBase get_param(const String ¶m)const;
84 virtual Rect get_full_bounding_rect(Context context)const;
86 virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const;
87 }; // END of class Layer_Composite
89 }; // END of namespace sinfg
91 /* === E N D =============================================================== */