[dali_1.2.54] Merge branch 'devel/master' 49/146249/1
authorFrancisco Santos <f1.santos@samsung.com>
Fri, 25 Aug 2017 10:49:33 +0000 (11:49 +0100)
committerFrancisco Santos <f1.santos@samsung.com>
Fri, 25 Aug 2017 10:49:33 +0000 (11:49 +0100)
Change-Id: Ifaa7589fc7fc57066a9957cf1ce06ba19057f4cc

13 files changed:
automated-tests/execute.sh
automated-tests/scripts/tcheadgen.sh
automated-tests/src/dali-toolkit-internal/tct-dali-toolkit-internal-core.cpp
automated-tests/src/dali-toolkit-styling/tct-dali-toolkit-styling-core.cpp
automated-tests/src/dali-toolkit-third-party/tct-dali-toolkit-third-party-core.cpp
automated-tests/src/dali-toolkit/tct-dali-toolkit-core.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp
dali-toolkit/devel-api/controls/text-controls/text-label-devel.h
dali-toolkit/internal/controls/text-controls/text-label-impl.cpp
dali-toolkit/internal/text/text-scroller.cpp
dali-toolkit/internal/visuals/text/text-visual.cpp
dali-toolkit/public-api/dali-toolkit-version.cpp
packaging/dali-toolkit.spec

index 989560f..902ba11 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-TEMP=`getopt -o dhsSm --long debug,help,serial,tct,modules -n 'execute.sh' -- "$@"`
+TEMP=`getopt -o dhsSmf --long debug,help,failnorerun,serial,tct,modules -n 'execute.sh' -- "$@"`
 
 if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
 
@@ -11,6 +11,7 @@ function usage
 {
     echo -e "Usage: execute.sh [-d][-s|-S|-r] [module|testcase]"
     echo -e "       execute.sh\t\tExecute test cases from all modules in parallel"
+    echo -e "       execute.sh -f \tExecute test cases from all modules in parallel without rerunning failed test cases"
     echo -e "       execute.sh -d <testcase>\tDebug testcase"
     echo -e "       execute.sh [module]\tExecute test cases from the given module in parallel"
     echo -e "       execute.sh -s [module]\t\tExecute test cases in serial using Testkit-Lite"
@@ -23,11 +24,13 @@ opt_tct=0
 opt_serial=""
 opt_modules=0
 opt_debug=0
+opt_noFailedRerun="";
 while true ; do
     case "$1" in
         -h|--help)     usage ;;
         -d|--debug)    opt_debug=1 ; shift ;;
         -s|--tct)      opt_tct=1 ; shift ;;
+        -f|--nofailedrerun) opt_noFailedRerun="-f" ; shift ;;
         -S|--serial)   opt_serial="-s" ; shift ;;
         -m|--modules)  opt_modules=1 ; shift ;;
         --) shift; break;;
@@ -75,7 +78,7 @@ rm -f tct*core-tests.xml
 
 # Clean up old coverage data
 if [ -d ../build/tizen ] ; then
-    rm -f ../build/tizen/dali-toolkit/.libs/*.gcda
+    rm -f ../build/tizen/dali/.libs/*.gcda
 fi
 
 find build \( -name "*.gcda" \) -exec rm '{}' \;
@@ -116,7 +119,7 @@ else
         do
             echo -e "$ASCII_BOLD"
             echo -e "Executing $mod$ASCII_RESET"
-            build/src/$mod/tct-$mod-core -r $opt_serial
+            build/src/$mod/tct-$mod-core $opt_serial $opt_noFailedRerun
         done
         summary_end
 
@@ -126,7 +129,7 @@ else
         summary_start
         module=$1
         shift;
-        build/src/$module/tct-$module-core -r $opt_serial $*
+        build/src/$module/tct-$module-core $opt_serial $opt_noFailedRerun $*
         summary_end
 
     else
@@ -138,7 +141,9 @@ else
             ret=$?
             if [ $ret -ne 6 ] ; then
                 if [ $opt_debug -ne 0 ] ; then
+                    echo DEBUGGING:
                     gdb --args build/src/$mod/tct-$mod-core $1
+
                 else
                     echo $output
                     if [ $ret -eq 0 ] ; then echo -e "\nPassed" ; fi
index c7b7700..dfd378a 100755 (executable)
@@ -6,7 +6,7 @@ if [[ -z $1 ]]; then
 fi
 
 FILE="$PWD/$1"
-TFILE="/tmp/retr.csv"
+TFILE="/tmp/retr.csv$$"
 HEADER_NAME=$(echo $1 | tr '[:lower:]' '[:upper:]' | sed -e 's/-/_/g' -e 's/\./_/')
 SCRIPT_DIR="$(cd "$(dirname $0)" && pwd)"
 
@@ -69,3 +69,5 @@ print "};"
 print ""
 print "#endif // __" HEADER_NAME "__"
 }' $TFILE > $FILE
+unlink $TFILE
+
index fcf09c6..39ed044 100644 (file)
@@ -8,7 +8,7 @@ int main(int argc, char * const argv[])
 {
   int result = TestHarness::EXIT_STATUS_BAD_ARGUMENT;
 
-  const char* optString = "rs";
+  const char* optString = "sf";
   bool optRerunFailed(true);
   bool optRunSerially(false);
 
@@ -18,8 +18,8 @@ int main(int argc, char * const argv[])
     nextOpt = getopt( argc, argv, optString );
     switch(nextOpt)
     {
-      case 'r':
-        optRerunFailed = true;
+      case 'f':
+        optRerunFailed = false;
         break;
       case 's':
         optRunSerially = true;
index 6e99684..ef04d46 100644 (file)
@@ -8,7 +8,7 @@ int main(int argc, char * const argv[])
 {
   int result = TestHarness::EXIT_STATUS_BAD_ARGUMENT;
 
-  const char* optString = "rs";
+  const char* optString = "sf";
   bool optRerunFailed(true);
   bool optRunSerially(false);
 
@@ -18,8 +18,8 @@ int main(int argc, char * const argv[])
     nextOpt = getopt( argc, argv, optString );
     switch(nextOpt)
     {
-      case 'r':
-        optRerunFailed = true;
+      case 'f':
+        optRerunFailed = false;
         break;
       case 's':
         optRunSerially = true;
index df212a2..d188f08 100644 (file)
@@ -8,7 +8,7 @@ int main(int argc, char * const argv[])
 {
   int result = TestHarness::EXIT_STATUS_BAD_ARGUMENT;
 
-  const char* optString = "rs";
+  const char* optString = "sf";
   bool optRerunFailed(true);
   bool optRunSerially(false);
 
@@ -18,8 +18,8 @@ int main(int argc, char * const argv[])
     nextOpt = getopt( argc, argv, optString );
     switch(nextOpt)
     {
-      case 'r':
-        optRerunFailed = true;
+      case 'f':
+        optRerunFailed = false;
         break;
       case 's':
         optRunSerially = true;
index b603310..5e64bd3 100644 (file)
@@ -8,7 +8,7 @@ int main(int argc, char * const argv[])
 {
   int result = TestHarness::EXIT_STATUS_BAD_ARGUMENT;
 
-  const char* optString = "rs";
+  const char* optString = "sf";
   bool optRerunFailed(true);
   bool optRunSerially(false);
 
@@ -18,8 +18,8 @@ int main(int argc, char * const argv[])
     nextOpt = getopt( argc, argv, optString );
     switch(nextOpt)
     {
-      case 'r':
-        optRerunFailed = true;
+      case 'f':
+        optRerunFailed = false;
         break;
       case 's':
         optRunSerially = true;
index 6972fb1..beba3a6 100644 (file)
@@ -959,3 +959,34 @@ int UtcDaliToolkitTextlabelTextWarpMode(void)
 
   END_TEST;
 }
+
+int UtcDaliToolkitTextLabelColorComponents(void)
+{
+  ToolkitTestApplication application;
+
+  TextLabel label = TextLabel::New();
+  label.SetProperty( DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE, Color::RED );
+  DALI_TEST_EQUALS( label.GetProperty< float >( DevelTextLabel::Property::TEXT_COLOR_RED ),   1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( label.GetProperty< float >( DevelTextLabel::Property::TEXT_COLOR_GREEN ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( label.GetProperty< float >( DevelTextLabel::Property::TEXT_COLOR_BLUE ),  0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( label.GetProperty< float >( DevelTextLabel::Property::TEXT_COLOR_ALPHA ), 1.0f, TEST_LOCATION );
+
+  label.SetProperty( DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE, Color::GREEN );
+  DALI_TEST_EQUALS( label.GetProperty< float >( DevelTextLabel::Property::TEXT_COLOR_RED ),   0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( label.GetProperty< float >( DevelTextLabel::Property::TEXT_COLOR_GREEN ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( label.GetProperty< float >( DevelTextLabel::Property::TEXT_COLOR_BLUE ),  0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( label.GetProperty< float >( DevelTextLabel::Property::TEXT_COLOR_ALPHA ), 1.0f, TEST_LOCATION );
+
+  label.SetProperty( DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE, Color::BLUE );
+  DALI_TEST_EQUALS( label.GetProperty< float >( DevelTextLabel::Property::TEXT_COLOR_RED ),   0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( label.GetProperty< float >( DevelTextLabel::Property::TEXT_COLOR_GREEN ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( label.GetProperty< float >( DevelTextLabel::Property::TEXT_COLOR_BLUE ),  1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( label.GetProperty< float >( DevelTextLabel::Property::TEXT_COLOR_ALPHA ), 1.0f, TEST_LOCATION );
+
+  label.SetProperty( DevelTextLabel::Property::TEXT_COLOR_ALPHA, 0.6f );
+  DALI_TEST_EQUALS( label.GetProperty< float >( DevelTextLabel::Property::TEXT_COLOR_ALPHA ), 0.6f, TEST_LOCATION );
+  DALI_TEST_EQUALS( label.GetProperty< Vector4 >( DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE ), Vector4( 0.0f, 0.0f, 1.0f, 0.6f ), TEST_LOCATION );
+  DALI_TEST_EQUALS( label.GetProperty< Vector4 >( TextLabel::Property::TEXT_COLOR ), Vector4( 0.0f, 0.0f, 1.0f, 0.6f ), TEST_LOCATION );
+
+  END_TEST;
+}
index c609d34..dfcd279 100644 (file)
@@ -44,78 +44,113 @@ namespace Property
 {
   enum Type
   {
-      RENDERING_BACKEND = Dali::Toolkit::TextLabel::Property::RENDERING_BACKEND,
-      TEXT = Dali::Toolkit::TextLabel::Property::TEXT,
-      FONT_FAMILY = Dali::Toolkit::TextLabel::Property::FONT_FAMILY,
-      FONT_STYLE = Dali::Toolkit::TextLabel::Property::FONT_STYLE,
-      POINT_SIZE = Dali::Toolkit::TextLabel::Property::POINT_SIZE,
-      MULTI_LINE = Dali::Toolkit::TextLabel::Property::MULTI_LINE,
-      HORIZONTAL_ALIGNMENT = Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT,
-      VERTICAL_ALIGNMENT = Dali::Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT,
-      TEXT_COLOR = Dali::Toolkit::TextLabel::Property::TEXT_COLOR,
-      SHADOW_OFFSET = Dali::Toolkit::TextLabel::Property::SHADOW_OFFSET,
-      SHADOW_COLOR = Dali::Toolkit::TextLabel::Property::SHADOW_COLOR,
-      UNDERLINE_ENABLED = Dali::Toolkit::TextLabel::Property::UNDERLINE_ENABLED,
-      UNDERLINE_COLOR = Dali::Toolkit::TextLabel::Property::UNDERLINE_COLOR,
-      UNDERLINE_HEIGHT = Dali::Toolkit::TextLabel::Property::UNDERLINE_HEIGHT,
-      ENABLE_MARKUP = Dali::Toolkit::TextLabel::Property::ENABLE_MARKUP,
-      ENABLE_AUTO_SCROLL = Dali::Toolkit::TextLabel::Property::ENABLE_AUTO_SCROLL,
-      AUTO_SCROLL_SPEED = Dali::Toolkit::TextLabel::Property::AUTO_SCROLL_SPEED,
-      AUTO_SCROLL_LOOP_COUNT = Dali::Toolkit::TextLabel::Property::AUTO_SCROLL_LOOP_COUNT,
-      AUTO_SCROLL_GAP = Dali::Toolkit::TextLabel::Property::AUTO_SCROLL_GAP,
-      LINE_SPACING = Dali::Toolkit::TextLabel::Property::LINE_SPACING,
-      UNDERLINE = Dali::Toolkit::TextLabel::Property::UNDERLINE,
-      SHADOW = Dali::Toolkit::TextLabel::Property::SHADOW,
-      EMBOSS = Dali::Toolkit::TextLabel::Property::EMBOSS,
-      OUTLINE = Dali::Toolkit::TextLabel::Property::OUTLINE,
-
-      /**
-       * @brief The size of font in pixels.
-       *
-       * Conversion from Point size to Pixel size :
-       *  Pixel size = Point size * DPI / 72
-       * @details name "pixelSize", type float
-       */
-      PIXEL_SIZE = OUTLINE + 1,
-
-      /**
-       * @brief Enable or disable the ellipsis.
-       * @details name "ellipsis", type bool
-       */
-      ELLIPSIS = OUTLINE + 2,
-
-      /**
-       * @brief delay starting time of auto scrolling and further loops
-       * @details name "autoScrollLoopDelay", type float.
-       */
-      AUTO_SCROLL_LOOP_DELAY = OUTLINE + 3,
-
-      /**
-       * @brief Auto scrolling stop behaviour.
-       * @details name "autoScrollStopMode", type [Type](@ref Dali::Toolkit::DevelTextLabel::AutoScrollStopMode::Type) (Property::INTEGER) or Property::STRING.
-       *          values FINISH_LOOP, IMMEDIATE, defualt FINISH_LOOP
-       */
-      AUTO_SCROLL_STOP_MODE = OUTLINE + 4,
-
-      /*
-       * @brief The line count of text.
-       * @details name "lineCount", type int
-       * @node this property is read-only.
-       */
-      LINE_COUNT = OUTLINE + 5,
-
-      /**
-       * @brief line wrap mode when the text lines over layout width.
-       * @details name "lineWrapMode", type string.
-       */
-      LINE_WRAP_MODE = OUTLINE + 6,
-
-      /*
-       * @brief Animatable text color
-       * @details text color property to use if required to animate the text color
-       */
-      TEXT_COLOR_ANIMATABLE = ANIMATABLE_PROPERTY_START_INDEX
-
+    ///////////////////////////////////////////////////////////////////////////////
+    // Event side (non-animatable) properties
+    ///////////////////////////////////////////////////////////////////////////////
+
+    RENDERING_BACKEND = Dali::Toolkit::TextLabel::Property::RENDERING_BACKEND,
+    TEXT = Dali::Toolkit::TextLabel::Property::TEXT,
+    FONT_FAMILY = Dali::Toolkit::TextLabel::Property::FONT_FAMILY,
+    FONT_STYLE = Dali::Toolkit::TextLabel::Property::FONT_STYLE,
+    POINT_SIZE = Dali::Toolkit::TextLabel::Property::POINT_SIZE,
+    MULTI_LINE = Dali::Toolkit::TextLabel::Property::MULTI_LINE,
+    HORIZONTAL_ALIGNMENT = Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT,
+    VERTICAL_ALIGNMENT = Dali::Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT,
+    TEXT_COLOR = Dali::Toolkit::TextLabel::Property::TEXT_COLOR,
+    SHADOW_OFFSET = Dali::Toolkit::TextLabel::Property::SHADOW_OFFSET,
+    SHADOW_COLOR = Dali::Toolkit::TextLabel::Property::SHADOW_COLOR,
+    UNDERLINE_ENABLED = Dali::Toolkit::TextLabel::Property::UNDERLINE_ENABLED,
+    UNDERLINE_COLOR = Dali::Toolkit::TextLabel::Property::UNDERLINE_COLOR,
+    UNDERLINE_HEIGHT = Dali::Toolkit::TextLabel::Property::UNDERLINE_HEIGHT,
+    ENABLE_MARKUP = Dali::Toolkit::TextLabel::Property::ENABLE_MARKUP,
+    ENABLE_AUTO_SCROLL = Dali::Toolkit::TextLabel::Property::ENABLE_AUTO_SCROLL,
+    AUTO_SCROLL_SPEED = Dali::Toolkit::TextLabel::Property::AUTO_SCROLL_SPEED,
+    AUTO_SCROLL_LOOP_COUNT = Dali::Toolkit::TextLabel::Property::AUTO_SCROLL_LOOP_COUNT,
+    AUTO_SCROLL_GAP = Dali::Toolkit::TextLabel::Property::AUTO_SCROLL_GAP,
+    LINE_SPACING = Dali::Toolkit::TextLabel::Property::LINE_SPACING,
+    UNDERLINE = Dali::Toolkit::TextLabel::Property::UNDERLINE,
+    SHADOW = Dali::Toolkit::TextLabel::Property::SHADOW,
+    EMBOSS = Dali::Toolkit::TextLabel::Property::EMBOSS,
+    OUTLINE = Dali::Toolkit::TextLabel::Property::OUTLINE,
+
+    /**
+     * @brief The size of font in pixels.
+     * @details Name "pixelSize", type Property::FLOAT.
+     *          Conversion from Point size to Pixel size:
+     *            Pixel size = Point size * DPI / 72
+     */
+    PIXEL_SIZE = OUTLINE + 1,
+
+    /**
+     * @brief Enable or disable the ellipsis.
+     * @details Name "ellipsis", type Property::BOOLEAN.
+     */
+    ELLIPSIS = OUTLINE + 2,
+
+    /**
+     * @brief delay starting time of auto scrolling and further loops
+     * @details Name "autoScrollLoopDelay", type Property::FLOAT.
+     */
+    AUTO_SCROLL_LOOP_DELAY = OUTLINE + 3,
+
+    /**
+     * @brief Auto scrolling stop behaviour.
+     * @details Name "autoScrollStopMode", type [Type](@ref Dali::Toolkit::DevelTextLabel::AutoScrollStopMode::Type) (Property::INTEGER) or Property::STRING.
+     *          Values FINISH_LOOP, IMMEDIATE, default FINISH_LOOP
+     */
+    AUTO_SCROLL_STOP_MODE = OUTLINE + 4,
+
+    /*
+     * @brief The line count of text.
+     * @details name "lineCount", type int
+     * @node This property is read-only.
+     */
+    LINE_COUNT = OUTLINE + 5,
+
+    /**
+     * @brief line wrap mode when the text lines over layout width.
+     * @details Name "lineWrapMode", type Property::STRING.
+     */
+    LINE_WRAP_MODE = OUTLINE + 6,
+
+    ///////////////////////////////////////////////////////////////////////////////
+    // Animatable Properties
+    ///////////////////////////////////////////////////////////////////////////////
+
+    /*
+     * @brief Animatable text color.
+     * @details Name "textColorAnimatable", type Property::VECTOR4.
+     *          Text color property to use if required to animate the text color.
+     */
+    TEXT_COLOR_ANIMATABLE = ANIMATABLE_PROPERTY_START_INDEX,
+
+    /**
+     * @brief The red component of the text color.
+     * @details Name "textColorRed", type Property::FLOAT.
+     * @see TEXT_COLOR_ANIMATABLE
+     */
+    TEXT_COLOR_RED = ANIMATABLE_PROPERTY_START_INDEX + 1,
+
+    /**
+     * @brief The green component of the text color.
+     * @details Name "textColorGreen", type Property::FLOAT.
+     * @see TEXT_COLOR_ANIMATABLE
+     */
+    TEXT_COLOR_GREEN = ANIMATABLE_PROPERTY_START_INDEX + 2,
+
+    /**
+     * @brief The blue component of the text color.
+     * @details Name "textColorBlue", type Property::FLOAT.
+     * @see TEXT_COLOR_ANIMATABLE
+     */
+    TEXT_COLOR_BLUE = ANIMATABLE_PROPERTY_START_INDEX + 3,
+
+    /**
+     * @brief The alpha component of the text color.
+     * @details Name "textColorAlpha", type Property::FLOAT.
+     * @see TEXT_COLOR_ANIMATABLE
+     */
+    TEXT_COLOR_ALPHA = ANIMATABLE_PROPERTY_START_INDEX + 4,
   };
 } // namespace Property
 
index 3778d1b..d92b1cd 100644 (file)
@@ -135,6 +135,10 @@ DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextLabel, "autoScrollStopMode",  STR
 DALI_DEVEL_PROPERTY_REGISTRATION_READ_ONLY( Toolkit, TextLabel, "lineCount", INTEGER, LINE_COUNT             )
 DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextLabel, "lineWrapMode",        STRING,  LINE_WRAP_MODE         )
 DALI_DEVEL_ANIMATABLE_PROPERTY_REGISTRATION_WITH_DEFAULT( Toolkit, TextLabel, "textColorAnimatable", Color::BLACK, TEXT_COLOR_ANIMATABLE )
+DALI_DEVEL_ANIMATABLE_PROPERTY_COMPONENT_REGISTRATION( Toolkit, TextLabel, "textColorRed",   TEXT_COLOR_RED,   TEXT_COLOR_ANIMATABLE, 0)
+DALI_DEVEL_ANIMATABLE_PROPERTY_COMPONENT_REGISTRATION( Toolkit, TextLabel, "textColorGreen", TEXT_COLOR_GREEN, TEXT_COLOR_ANIMATABLE, 1)
+DALI_DEVEL_ANIMATABLE_PROPERTY_COMPONENT_REGISTRATION( Toolkit, TextLabel, "textColorBlue",  TEXT_COLOR_BLUE,  TEXT_COLOR_ANIMATABLE, 2)
+DALI_DEVEL_ANIMATABLE_PROPERTY_COMPONENT_REGISTRATION( Toolkit, TextLabel, "textColorAlpha", TEXT_COLOR_ALPHA, TEXT_COLOR_ANIMATABLE, 3)
 DALI_TYPE_REGISTRATION_END()
 
 } // namespace
@@ -601,12 +605,8 @@ Property::Value TextLabel::GetProperty( BaseObject* object, Property::Index inde
         break;
       }
       case Toolkit::TextLabel::Property::TEXT_COLOR:
-      case Toolkit::DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE:
       {
-        if ( impl.mController )
-        {
-          value = impl.mController->GetDefaultColor();
-        }
+        value = label.GetProperty( Toolkit::DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE );
         break;
       }
       case Toolkit::TextLabel::Property::SHADOW_OFFSET:
@@ -958,9 +958,9 @@ void TextLabel::SetUpAutoScrolling()
   TextureSet textureSet = TextureSet::New();
   textureSet.SetTexture( 0u, texture );
 
-  // Filter mode needs to be set to nearest to avoid blurry text.
+  // Filter mode needs to be set to linear to produce better quality while scaling.
   Sampler sampler = Sampler::New();
-  sampler.SetFilterMode( FilterMode::NEAREST, FilterMode::NEAREST );
+  sampler.SetFilterMode( FilterMode::LINEAR, FilterMode::LINEAR );
   textureSet.SetSampler( 0u, sampler );
 
   // Set parameters for scrolling
index 49173e9..b109661 100644 (file)
@@ -44,7 +44,6 @@ const char* VERTEX_SHADER_SCROLL = DALI_COMPOSE_SHADER(
   attribute mediump vec2 aPosition;\n
   varying highp vec2 vTexCoord;\n
   varying highp float vRatio;\n
-  uniform mediump mat4 uMvpMatrix;\n
   uniform mediump vec3 uSize;\n
   uniform mediump float uDelta;\n
   uniform mediump vec2 uTextureSize;\n
@@ -52,17 +51,34 @@ const char* VERTEX_SHADER_SCROLL = DALI_COMPOSE_SHADER(
   uniform mediump float uHorizontalAlign;\n
   uniform mediump float uVerticalAlign;\n
   \n
+  uniform mediump mat4 uModelMatrix;\n
+  uniform mediump mat4 uViewMatrix;\n
+  uniform mediump mat4 uProjection;\n
+  \n
+  //Visual size and offset
+  uniform mediump vec2 offset;\n
+  uniform mediump vec2 size;\n
+  uniform mediump vec4 offsetSizeMode;\n
+  uniform mediump vec2 origin;\n
+  uniform mediump vec2 anchorPoint;\n
+
   void main()\n
   {\n
-    {\n
-      float smallTextPadding = max( uSize.x - uTextureSize.x, 0. );\n
-      float gap = max( uGap, smallTextPadding );\n
-      float delta = floor ( uDelta ) + 0.5;\n
-      vTexCoord.x = ( delta + uHorizontalAlign * ( uTextureSize.x - uSize.x ) + floor( aPosition.x * uSize.x ) + 0.5 - gap * 0.5 ) / (uTextureSize.x + gap) + 0.5;\n
-      vTexCoord.y = ( uVerticalAlign * ( uTextureSize.y - uSize.y ) + floor( aPosition.y * uSize.y ) + 0.5 ) / ( uTextureSize.y ) + 0.5;\n
-      vRatio = uTextureSize.x / ( uTextureSize.x + gap );\n
-      gl_Position = uMvpMatrix * vec4( floor( aPosition * uSize.xy ), 0.0, 1.0 );\n
-    }\n
+    mediump vec2 visualOffset = mix( offset, offset/uSize.xy, offsetSizeMode.xy );\n
+    mediump vec2 visualSize = mix( uSize.xy * size, size, offsetSizeMode.zw );\n
+    \n
+    mediump float smallTextPadding = max( visualSize.x - uTextureSize.x, 0. );\n
+    mediump float gap = max( uGap, smallTextPadding );\n
+    mediump float delta = floor ( uDelta ) + 0.5;\n
+    vTexCoord.x = ( delta + uHorizontalAlign * ( uTextureSize.x - visualSize.x ) + floor( aPosition.x * visualSize.x ) + 0.5 - gap * 0.5 ) / ( uTextureSize.x + gap ) + 0.5;\n
+    vTexCoord.y = ( uVerticalAlign * ( uTextureSize.y - visualSize.y ) + floor( aPosition.y * visualSize.y ) + 0.5 ) / ( uTextureSize.y ) + 0.5;\n
+    vRatio = uTextureSize.x / ( uTextureSize.x + gap );\n
+    \n
+    mediump vec4 vertexPosition = vec4( floor( ( aPosition + anchorPoint ) * visualSize + ( visualOffset + origin ) * uSize.xy ), 0.0, 1.0 );\n
+    mediump vec4 nonAlignedVertex = uViewMatrix * uModelMatrix * vertexPosition;\n
+    mediump vec4 pixelAlignedVertex = vec4 ( floor( nonAlignedVertex.xyz ), 1.0 );\n
+    \n
+    gl_Position = uProjection * pixelAlignedVertex;\n
   }\n
 );
 
index 8870fc0..46cb2a1 100644 (file)
@@ -587,9 +587,9 @@ void TextVisual::UpdateRenderer()
 
       textureSet.SetTexture( 2u, maskTexture );
 
-      // Filter mode needs to be set to nearest to avoid blurry text.
+      // Filter mode needs to be set to linear to produce better quality while scaling.
       Sampler sampler = Sampler::New();
-      sampler.SetFilterMode( FilterMode::NEAREST, FilterMode::NEAREST );
+      sampler.SetFilterMode( FilterMode::LINEAR, FilterMode::LINEAR );
       textureSet.SetSampler( 0u, sampler );
       textureSet.SetSampler( 1u, sampler );
       textureSet.SetSampler( 2u, sampler );
index 377aea1..aa4f80f 100644 (file)
@@ -31,7 +31,7 @@ namespace Toolkit
 
 const unsigned int TOOLKIT_MAJOR_VERSION = 1;
 const unsigned int TOOLKIT_MINOR_VERSION = 2;
-const unsigned int TOOLKIT_MICRO_VERSION = 53;
+const unsigned int TOOLKIT_MICRO_VERSION = 54;
 const char * const TOOLKIT_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index d9bca28..10159cf 100644 (file)
@@ -1,6 +1,6 @@
 Name:       dali-toolkit
 Summary:    The OpenGLES Canvas Core Library Toolkit
-Version:    1.2.53
+Version:    1.2.54
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT