1e83c1acb361381d9f80e4615a44d01a24c41389
[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 Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
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
21 // EXTERNAL INCLUDES
22 #include <dali/public-api/render-tasks/render-task.h>
23 #include <dali-toolkit/public-api/controls/image-view/image-view.h>
24 #include <dali-toolkit/devel-api/visual-factory/visual.h>
25 #include "image-filter.h"
26
27 namespace Dali
28 {
29
30 namespace Toolkit
31 {
32
33 namespace Internal
34 {
35
36 /**
37  * An embossing image filter, implements Dali::Toolkit::Internal::ImageFilter
38  */
39 class EmbossFilter : public ImageFilter
40 {
41 public:
42   /**
43    * Construct an empty filter
44    */
45   EmbossFilter();
46
47   /**
48    * Destructor
49    */
50   virtual ~EmbossFilter();
51
52 public: // From ImageFilter
53   /// @copydoc Dali::Toolkit::Internal::ImageFilter::Enable
54   virtual void Enable();
55
56   /// @copydoc Dali::Toolkit::Internal::ImageFilter::Disable
57   virtual void Disable();
58
59   /// @copydoc Dali::Toolkit::Internal::ImageFilter::Refresh
60   virtual void Refresh();
61
62   /// @copydoc Dali::Toolkit::Internal::ImageFilter::SetSize
63   virtual void SetSize( const Vector2& size );
64
65 private:
66   /**
67    * Setup render tasks for blur
68    */
69   void CreateRenderTasks();
70
71 private:
72   EmbossFilter( const EmbossFilter& );
73   EmbossFilter& operator=( const EmbossFilter& );
74
75 private: // Attributes
76
77   RenderTask         mRenderTaskForEmboss1;
78   RenderTask         mRenderTaskForEmboss2;
79   RenderTask         mRenderTaskForOutput;
80   FrameBufferImage   mImageForEmboss1;
81   FrameBufferImage   mImageForEmboss2;
82   Toolkit::ImageView mActorForInput1;
83   Toolkit::ImageView mActorForInput2;
84   Toolkit::Visual mRendererForEmboss1;
85   Toolkit::Visual mRendererForEmboss2;
86   Actor              mActorForComposite;
87 }; // class EmbossFilter
88
89 } // namespace Internal
90
91 } // namespace Toolkit
92
93 } // namespace Dali
94
95 #endif // __DALI_TOOLKIT_INTERNAL_EMBOSS_FILTER_H__
96