Merge "DALi Version 1.2.48" into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / shader-effects / dissolve-effect.h
index 0825a5d..0c26d95 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_TOOLKIT_SHADER_EFFECT_DISSOLVE_H__
-#define __DALI_TOOLKIT_SHADER_EFFECT_DISSOLVE_H__
+#ifndef DALI_TOOLKIT_SHADER_EFFECT_DISSOLVE_H_
+#define DALI_TOOLKIT_SHADER_EFFECT_DISSOLVE_H
 
 /*
 
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 // EXTERNAL INCLUDES
 #include <string.h>
 
 // EXTERNAL INCLUDES
 #include <string.h>
-#include <dali/devel-api/rendering/shader.h>
+#include <dali/public-api/rendering/shader.h>
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
 
 namespace Dali
 {
 
 namespace Dali
 {
@@ -35,9 +38,10 @@ namespace Toolkit
  * As we use the texture coordinate as pixel position to calculate random offset,
  * the line should passing through rectangle {(0,0),(0,1),(1,0),(1,1)},
  * so make the position parameter with two component values between 0.0 to 1.0
  * As we use the texture coordinate as pixel position to calculate random offset,
  * the line should passing through rectangle {(0,0),(0,1),(1,0),(1,1)},
  * so make the position parameter with two component values between 0.0 to 1.0
+ * @param[in] actor The actor that registers the uniform properties
  * @param[in] position The point ( locates within rectangle {(0,0),(0,1),(1,0),(1,1)} ) passed through by the central line
  * @param[in] displacement The direction of the central line
  * @param[in] position The point ( locates within rectangle {(0,0),(0,1),(1,0),(1,1)} ) passed through by the central line
  * @param[in] displacement The direction of the central line
- * @param[in] initialProgress, the normalised initial progress of the shader
+ * @param[in] initialProgress The normalised initial progress of the shader
  */
 inline void DissolveEffectSetCentralLine( Actor& actor, const Vector2& position, const Vector2& displacement, float initialProgress )
 {
  */
 inline void DissolveEffectSetCentralLine( Actor& actor, const Vector2& position, const Vector2& displacement, float initialProgress )
 {
@@ -112,7 +116,7 @@ inline void DissolveEffectSetCentralLine( Actor& actor, const Vector2& position,
 /**
  * @brief Create a new Dissolve effect
  *
 /**
  * @brief Create a new Dissolve effect
  *
- *  DissolveEffect is a custom shader effect to achieve Dissolve effects in Image actors.
+ *  DissolveEffect is a custom shader effect to achieve Dissolve effects in image views.
  *
  *  Animatable/Constrainable uniforms:
  *    "uPercentage" - This value is proportional to the distortion applied; a value of zero means no distortion.
  *
  *  Animatable/Constrainable uniforms:
  *    "uPercentage" - This value is proportional to the distortion applied; a value of zero means no distortion.
@@ -213,15 +217,15 @@ inline Property::Map CreateDissolveEffect( bool useHighPrecision = true )
   vertexShaderString.append( vertexShader );
   fragmentShaderString.append( fragmentShader );
 
   vertexShaderString.append( vertexShader );
   fragmentShaderString.append( fragmentShader );
 
-  customShader[ "vertexShader" ] = vertexShaderString;
-  customShader[ "fragmentShader" ] = fragmentShaderString;
+  customShader[ Visual::Shader::Property::VERTEX_SHADER ] = vertexShaderString;
+  customShader[ Visual::Shader::Property::FRAGMENT_SHADER ] = fragmentShaderString;
 
 
-  customShader[ "subdivideGridX" ] = 20;
-  customShader[ "subdivideGridY" ] = 20;
+  customShader[ Visual::Shader::Property::SUBDIVIDE_GRID_X ] = 20;
+  customShader[ Visual::Shader::Property::SUBDIVIDE_GRID_Y ] = 20;
 
 
-  customShader[ "hints" ] = "outputIsTransparent";
+  customShader[ Visual::Shader::Property::HINTS ] = Shader::Hint::OUTPUT_IS_TRANSPARENT;
 
 
-  map[ "shader" ] = customShader;
+  map[ Visual::Property::SHADER ] = customShader;
   return map;
 }
 
   return map;
 }
 
@@ -229,4 +233,4 @@ inline Property::Map CreateDissolveEffect( bool useHighPrecision = true )
 
 } // namespace Dali
 
 
 } // namespace Dali
 
-#endif // __DALI_TOOLKIT_SHADER_EFFECT_DISSOLVE_H__
+#endif // DALI_TOOLKIT_SHADER_EFFECT_DISSOLVE_H