Purge underscored header file barriers
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / shader-effects / image-region-effect.h
index 7d263d9..f031f15 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_TOOLKIT_IMAGE_REGION_EFFECT_H__
-#define __DALI_TOOLKIT_IMAGE_REGION_EFFECT_H__
+#ifndef DALI_TOOLKIT_IMAGE_REGION_EFFECT_H
+#define DALI_TOOLKIT_IMAGE_REGION_EFFECT_H
 
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -21,6 +21,9 @@
 // EXTERNAL INCLUDES
 #include <dali/public-api/object/property-map.h>
 
+// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
+
 namespace Dali
 {
 
@@ -38,7 +41,7 @@ namespace Toolkit
  *  "uBottomRight"  - The bottom-right corner of the image region. The coordinates are in percentage,
  *                    (0,0) being the top-left and (1,1) the bottom right of the original image
  *
- * @return A handle to a newly allocated ShaderEffect
+ * @return A property map of the required shader
  */
 inline Property::Map CreateImageRegionEffect()
 {
@@ -59,10 +62,10 @@ inline Property::Map CreateImageRegionEffect()
       "  position.xyz *= uSize;\n"
       "  gl_Position = uMvpMatrix * position;\n"
       // The line below is doing the same as the following commented lines:
-      //"  vec2 imageSize = sTextureRect.zw - sTextureRect.xy;\n"
-      //"  vec2 topLeft = sTextureRect.xy + uTopLeft * imageSize;\n"
-      //"  vec2 bottomRight = sTextureRect.xy + uBottomRight * imageSize;\n"
-      //"  vec2 texCoord = (aTexCoord - sTextureRect.xy) / imageSize;\n"
+      //"  vec2 imageSize = uTextureRect.zw - uTextureRect.xy;\n"
+      //"  vec2 topLeft = uTextureRect.xy + uTopLeft * imageSize;\n"
+      //"  vec2 bottomRight = uTextureRect.xy + uBottomRight * imageSize;\n"
+      //"  vec2 texCoord = (aTexCoord - uTextureRect.xy) / imageSize;\n"
       //"  vTexCoord = topLeft + texCoord * ( bottomRight - topLeft );\n"
 
       "  vec2 texCoord = aPosition + vec2(0.5);\n"
@@ -73,9 +76,9 @@ inline Property::Map CreateImageRegionEffect()
   Property::Map map;
 
   Property::Map customShader;
-  customShader[ "vertexShader" ] = vertexShader;
+  customShader[ Visual::Shader::Property::VERTEX_SHADER ] = vertexShader;
 
-  map[ "shader" ] = customShader;
+  map[ Toolkit::Visual::Property::SHADER ] = customShader;
   return map;
 }
 
@@ -83,4 +86,4 @@ inline Property::Map CreateImageRegionEffect()
 
 } // namespace Dali
 
-#endif // __DALI_TOOLKIT_IMAGE_REGION_EFFECT_H__
+#endif // DALI_TOOLKIT_IMAGE_REGION_EFFECT_H