12511cf1bb6a6e84fc70ca3290bb001672f2a86e
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / filters / emboss-filter.h
1 #ifndef __DALI_TOOLKIT_INTERNAL_EMBOSS_FILTER_H__
2 #define __DALI_TOOLKIT_INTERNAL_EMBOSS_FILTER_H__
3
4 //
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
6 //
7 // Licensed under the Flora License, Version 1.0 (the License);
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
10 //
11 //     http://floralicense.org/license/
12 //
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an AS IS BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
18 //
19
20 // EXTERNAL INCLUDES
21
22 // INTERNAL INCLUDES
23 #include <dali/dali.h>
24 #include "image-filter.h"
25
26 namespace Dali
27 {
28
29 namespace Toolkit
30 {
31
32 namespace Internal
33 {
34
35 /**
36  * An embossing image filter, implements Dali::Toolkit::Internal::ImageFilter
37  */
38 class EmbossFilter : public ImageFilter
39 {
40 public:
41   /**
42    * Construct an empty filter
43    */
44   EmbossFilter();
45
46   /**
47    * Destructor
48    */
49   virtual ~EmbossFilter();
50
51 public: // From ImageFilter
52   /// @copydoc Dali::Toolkit::Internal::ImageFilter::Enable
53   virtual void Enable();
54
55   /// @copydoc Dali::Toolkit::Internal::ImageFilter::Disable
56   virtual void Disable();
57
58   /// @copydoc Dali::Toolkit::Internal::ImageFilter::Refresh
59   virtual void Refresh();
60
61 private:
62   /**
63    * Setup position and parameters for camera
64    */
65   void SetupCamera();
66
67   /**
68    * Setup render tasks for blur
69    */
70   void CreateRenderTasks();
71
72 private:
73   EmbossFilter( const EmbossFilter& );
74   EmbossFilter& operator=( const EmbossFilter& );
75
76 private: // Attributes
77
78   RenderTask       mRenderTaskForEmboss1;
79   RenderTask       mRenderTaskForEmboss2;
80   RenderTask       mRenderTaskForOutput;
81   FrameBufferImage mImageForEmboss1;
82   FrameBufferImage mImageForEmboss2;
83   CameraActor      mCameraActor;
84   ImageActor       mActorForInput1;
85   ImageActor       mActorForInput2;
86   ImageActor       mActorForEmboss1;
87   ImageActor       mActorForEmboss2;
88   Actor            mActorForComposite;
89 }; // class EmbossFilter
90
91 } // namespace Internal
92
93 } // namespace Toolkit
94
95 } // namespace Dali
96
97 #endif // __DALI_TOOLKIT_INTERNAL_EMBOSS_FILTER_H__
98