1 #ifndef __DALI_TOOLKIT_INTERNAL_SPREAD_FILTER_H__
2 #define __DALI_TOOLKIT_INTERNAL_SPREAD_FILTER_H__
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
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
11 // http://floralicense.org/license/
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.
23 #include <dali/dali.h>
24 #include "image-filter.h"
36 * A spread/thicken filter. Expands an image into transparent areas.
38 class SpreadFilter : public ImageFilter
49 virtual ~SpreadFilter();
52 * Set the amount of spread in pixels.
53 * @param[in] spread The amount of spread
55 void SetSpread( float spread );
57 public: // From ImageFilter
58 /// @copydoc Dali::Toolkit::Internal::ImageFilter::Enable
59 virtual void Enable();
61 /// @copydoc Dali::Toolkit::Internal::ImageFilter::Disable
62 virtual void Disable();
64 /// @copydoc Dali::Toolkit::Internal::ImageFilter::Refresh
65 virtual void Refresh();
69 * Setup position and parameters for camera
74 * Setup render tasks for blur
76 void CreateRenderTasks();
79 SpreadFilter( const SpreadFilter& );
80 SpreadFilter& operator=( const SpreadFilter& );
82 private: // Attributes
84 CameraActor mCameraActor;
86 // To perform horizontal spread from mInputImage to mImageForHorz
87 RenderTask mRenderTaskForHorz;
88 ImageActor mActorForInput;
89 FrameBufferImage mImageForHorz;
90 ShaderEffect mShaderForHorz;
92 // To perform vertical spread from mImageForHorz to mOutputImage
93 RenderTask mRenderTaskForVert;
94 ImageActor mActorForHorz;
95 ShaderEffect mShaderForVert;
96 }; // class SpreadFilter
98 } // namespace Internal
100 } // namespace Toolkit
104 #endif // __DALI_TOOLKIT_INTERNAL_SPREAD_FILTER_H__