Updated CAPI documentation style
[platform/core/uifw/dali-toolkit.git] / capi / dali-toolkit / public-api / shader-effects / iris-effect.h
1 #ifndef __DALI_TOOLKIT_SHADER_EFFECT_IRIS_H__
2 #define __DALI_TOOLKIT_SHADER_EFFECT_IRIS_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 /**
21  * @addtogroup CAPI_DALI_TOOLKIT_SHADER_EFFECTS_MODULE
22  * @{
23  */
24
25 // INTERNAL INCLUDES
26 #include <dali/dali.h>
27
28 namespace Dali DALI_IMPORT_API
29 {
30
31 namespace Toolkit
32 {
33
34 /**
35  * @brief IrisEffect is a custom shader effect to achieve iris effects in Image actors
36  */
37 class IrisEffect : public ShaderEffect
38 {
39
40 public:
41
42   /**
43    * @brief Create an uninitialized IrisEffect; this can be initialized with IrisEffect::New().
44    *
45    * Calling member functions with an uninitialized Dali::Object is not allowed.
46    */
47   IrisEffect();
48
49   /**
50    * @brief Virtual destructor.
51    */
52   virtual ~IrisEffect();
53
54   /**
55    * @brief Create an initialized IrisEffect.
56    *
57    * @return A handle to a newly allocated Dali resource.
58    */
59   static IrisEffect New();
60
61   /**
62    * @brief Set the radius of the iris effect in texture coordinate distance,
63    * i.e. 0.0 (no circle) to 1.0 (complete circle), to > 1.0 (extending
64    * outside of texture).
65    *
66    * @note For Atlas Textures results may be unpredictable.
67    *
68    * @param [in] radius The new radius.
69    */
70   void SetRadius(float radius);
71
72   /**
73    * @brief Set the blend factor of the iris effect.
74    *
75    * The lower the value, the larger the blending portion
76    * (between Opaque & Transparent)
77    *
78    * Blending will account for 1 / blendFactor of the radius
79    * of the texture.
80    *
81    * @param [in] value The new blend Factor.
82    */
83   void SetBlendFactor(float value);
84
85   /**
86    * @brief Sets the center point of the iris (in texture coordinates).
87    *
88    * @param[in] center The center point.
89    */
90   void SetCenter( const Vector2& center );
91
92   /**
93    * @brief Get the name for the radius property which can be used in Animation APIs.
94    *
95    * @return A std::string containing the property name
96    */
97   const std::string& GetRadiusPropertyName() const;
98
99   /**
100    * @brief Get the name for the blend factor property.
101    *
102    * @return A std::string containing the property name
103    */
104   const std::string& GetBlendFactorPropertyName() const;
105
106   /**
107    * @brief Get the name for the center property.
108    *
109    * @return A std::string containing the property name
110    */
111   const std::string& GetCenterPropertyName() const;
112
113
114 private: // Not intended for application developers
115   IrisEffect(ShaderEffect handle);
116 };
117
118 }
119 }
120
121 /**
122  * @}
123  */
124 #endif