X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Fshader-effects%2Fmotion-stretch-effect.h;h=3adfb3f60f9c2524e2351cbe3418350dc27eebe5;hp=326c7bdbf9f9d5bcce086356c44769a22ea6c5b2;hb=b694e7e2ae624e206e1548b1a863c554eb9cd4d7;hpb=8e902a37f200809376dc5746e0bcb9d40dd79049 diff --git a/dali-toolkit/devel-api/shader-effects/motion-stretch-effect.h b/dali-toolkit/devel-api/shader-effects/motion-stretch-effect.h index 326c7bd..3adfb3f 100644 --- a/dali-toolkit/devel-api/shader-effects/motion-stretch-effect.h +++ b/dali-toolkit/devel-api/shader-effects/motion-stretch-effect.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_SHADER_EFFECT_MOTION_STRETCH_H__ -#define __DALI_TOOLKIT_SHADER_EFFECT_MOTION_STRETCH_H__ +#ifndef DALI_TOOLKIT_SHADER_EFFECT_MOTION_STRETCH_H +#define DALI_TOOLKIT_SHADER_EFFECT_MOTION_STRETCH_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. @@ -19,7 +19,13 @@ */ // EXTERNAL INCLUDES -#include +#include +#include +#include +#include + +// INTERNAL INCLUDES +#include namespace Dali { @@ -58,11 +64,11 @@ inline void SetMotionStretchProperties( Actor& actor ) * its edges. This is used to prevent an unsightly hard edge between the stretched actor and * the scene. Depends on the values of the vertices in the vertex stream. When the actor is at * rest this is not applied. Default Vector2(0.25, 0.25), which is half way towards the edge for - * an ImageRenderer::QUAD. + * an ImageVisual::QUAD. * "uObjectFadeEnd" - The displacement from the centre of the actor that the actor will finish fading towards its edges. * This is used to prevent an unsightly hard edge between the stretched actor and the scene. Depends * on the values of the vertices in the vertex stream. When the actor is at rest this is not applied. - * Default 0.5, which is all the way towards the edge for an ImageRenderer::QUAD. + * Default 0.5, which is all the way towards the edge for an ImageVisual::QUAD. * "uAlphaScale" - Global scaler applied to the alpha of the actor. Used to make the stretched actor a bit more subtle * and reveal a bit of the background behind it as it moves. When the actor is at rest this is not * applied. Default 0.75. @@ -187,16 +193,15 @@ inline Property::Map CreateMotionStretchEffect() Property::Map map; Property::Map customShader; - customShader[ "vertexShader" ] = vertexSource; - customShader[ "fragmentShader" ] = fragmentSource; + customShader[ Visual::Shader::Property::VERTEX_SHADER ] = vertexSource; + customShader[ Visual::Shader::Property::FRAGMENT_SHADER ] = fragmentSource; - customShader[ "subdivideGridX" ] = 10; - customShader[ "subdivideGridY" ] = 10; + customShader[ Visual::Shader::Property::SUBDIVIDE_GRID_X ] = 10; + customShader[ Visual::Shader::Property::SUBDIVIDE_GRID_Y ] = 10; - // NOTE: we must turn on alpha blending for the actor (HINT_BLENDING) - customShader[ "hints" ] = "outputIsTransparent"; + customShader[ Visual::Shader::Property::HINTS ] = Shader::Hint::OUTPUT_IS_TRANSPARENT; - map[ "shader" ] = customShader; + map[ Toolkit::Visual::Property::SHADER ] = customShader; return map; } @@ -204,4 +209,4 @@ inline Property::Map CreateMotionStretchEffect() } -#endif //#ifndef __DALI_TOOLKIT_SHADER_EFFECT_MOTION_STRETCH_H__ +#endif // DALI_TOOLKIT_SHADER_EFFECT_MOTION_STRETCH_H