1 #ifndef __DALI_TOOLKIT_SHADER_EFFECT_IRIS_H__
2 #define __DALI_TOOLKIT_SHADER_EFFECT_IRIS_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.
21 * @addtogroup CAPI_DALI_FRAMEWORK
26 #include <dali/dali.h>
28 namespace Dali DALI_IMPORT_API
35 * IrisEffect is a custom shader effect to achieve iris effects in Image actors
37 class IrisEffect : public ShaderEffect
43 * Create an uninitialized IrisEffect; this can be initialized with IrisEffect::New()
44 * Calling member functions with an uninitialized Dali::Object is not allowed.
51 virtual ~IrisEffect();
54 * Create an initialized IrisEffect
55 * @return A handle to a newly allocated Dali resource.
57 static IrisEffect New();
60 * Set the radius of the iris effect (in texture coordinate distance,
61 * i.e. 0.0 (no circle) to 1.0 (complete circle), to > 1.0 (extending
64 * @note For Atlas Textures results may be unpredictable.
66 * @param [in] radius The new radius.
68 void SetRadius(float radius);
71 * Set the blend factor of the iris effect.
73 * The lower the value, the larger the blending portion
74 * (between Opaque & Transparent)
76 * Blending will account for 1 / blendFactor of the radius
79 * @param [in] value The new blend Factor.
81 void SetBlendFactor(float value);
84 * Sets the center point of the iris (in texture coordinates)
86 * @param[in] center The center point.
88 void SetCenter( const Vector2& center );
91 * Get the name for the radius property
92 * which can be used in Animation API's
93 * @return A std::string containing the property name
95 const std::string& GetRadiusPropertyName() const;
98 * Get the name for the blend factor property
99 * @return A std::string containing the property name
101 const std::string& GetBlendFactorPropertyName() const;
104 * Get the name for the center property
105 * @return A std::string containing the property name
107 const std::string& GetCenterPropertyName() const;
110 private: // Not intended for application developers
111 IrisEffect(ShaderEffect handle);