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 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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali/public-api/render-tasks/render-task.h>
23 #include <dali-toolkit/public-api/controls/image-view/image-view.h>
26 #include "image-filter.h"
38 * A spread/thicken filter. Expands an image into transparent areas.
40 class SpreadFilter : public ImageFilter
51 virtual ~SpreadFilter();
54 * Set the amount of spread in pixels.
55 * @param[in] spread The amount of spread
57 void SetSpread( float spread );
59 public: // From ImageFilter
60 /// @copydoc Dali::Toolkit::Internal::ImageFilter::Enable
61 virtual void Enable();
63 /// @copydoc Dali::Toolkit::Internal::ImageFilter::Disable
64 virtual void Disable();
66 /// @copydoc Dali::Toolkit::Internal::ImageFilter::Refresh
67 virtual void Refresh();
69 /// @copydoc Dali::Toolkit::Internal::ImageFilter::SetSize
70 virtual void SetSize( const Vector2& size );
75 * Setup render tasks for blur
77 void CreateRenderTasks();
80 SpreadFilter( const SpreadFilter& );
81 SpreadFilter& operator=( const SpreadFilter& );
83 private: // Attributes
85 // To perform horizontal spread from mInputImage to mImageForHorz
86 RenderTask mRenderTaskForHorz;
87 Toolkit::ImageView mActorForInput;
88 FrameBufferImage mImageForHorz;
90 // To perform vertical spread from mImageForHorz to mOutputImage
91 RenderTask mRenderTaskForVert;
92 Toolkit::ImageView mActorForHorz;
95 }; // class SpreadFilter
97 } // namespace Internal
99 } // namespace Toolkit
103 #endif // __DALI_TOOLKIT_INTERNAL_SPREAD_FILTER_H__