Merge branch 'devel/master' into tizen 27/174027/1
authordongsug.song <dongsug.song@samsung.com>
Tue, 27 Mar 2018 07:12:15 +0000 (16:12 +0900)
committerdongsug.song <dongsug.song@samsung.com>
Tue, 27 Mar 2018 07:12:27 +0000 (16:12 +0900)
Change-Id: Ic07690321966679b5c9012d40d94e86dd99260f8

80 files changed:
automated-tests/src/dali-toolkit-internal/CMakeLists.txt
automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Layout.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-Text-MultiLanguage.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-Text-ViewModel.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-TextureManager.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-Visuals-internal.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-adaptor.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-video-player.cpp [changed mode: 0644->0755]
automated-tests/src/dali-toolkit/utc-Dali-ImageView.cpp
automated-tests/src/dali-toolkit/utc-Dali-ImageVisual.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp
automated-tests/src/dali-toolkit/utc-Dali-TransitionData.cpp
automated-tests/src/dali-toolkit/utc-Dali-VideoView.cpp [changed mode: 0644->0755]
automated-tests/src/dali-toolkit/utc-Dali-Visual.cpp
automated-tests/src/dali-toolkit/utc-Dali-VisualFactory.cpp
build/tizen/docs/dali.doxy.in [changed mode: 0644->0755]
dali-toolkit/devel-api/controls/text-controls/text-label-devel.h
dali-toolkit/devel-api/visuals/text-visual-properties-devel.h
dali-toolkit/internal/accessibility-manager/accessibility-manager-impl.cpp
dali-toolkit/internal/accessibility-manager/accessibility-manager-impl.h
dali-toolkit/internal/controls/control/control-data-impl.cpp
dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp
dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.h
dali-toolkit/internal/controls/scrollable/scrollable-impl.cpp
dali-toolkit/internal/controls/text-controls/text-label-impl.cpp
dali-toolkit/internal/controls/video-view/video-view-impl.cpp [changed mode: 0644->0755]
dali-toolkit/internal/controls/video-view/video-view-impl.h [changed mode: 0644->0755]
dali-toolkit/internal/image-loader/image-load-thread.cpp
dali-toolkit/internal/image-loader/image-load-thread.h
dali-toolkit/internal/text/layouts/layout-engine.cpp
dali-toolkit/internal/text/markup-processor.cpp
dali-toolkit/internal/text/multi-language-support-impl.cpp
dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp
dali-toolkit/internal/text/rendering/text-typesetter.cpp
dali-toolkit/internal/text/rendering/view-model.cpp
dali-toolkit/internal/text/rendering/view-model.h
dali-toolkit/internal/text/text-controller-impl.cpp
dali-toolkit/internal/text/text-controller.cpp
dali-toolkit/internal/text/text-controller.h
dali-toolkit/internal/text/text-effects-style.cpp
dali-toolkit/internal/text/text-effects-style.h
dali-toolkit/internal/text/text-model-interface.h
dali-toolkit/internal/text/text-model.cpp
dali-toolkit/internal/text/text-model.h
dali-toolkit/internal/text/text-scroller.cpp
dali-toolkit/internal/text/visual-model-impl.cpp
dali-toolkit/internal/text/visual-model-impl.h
dali-toolkit/internal/visuals/animated-image/animated-image-visual.cpp
dali-toolkit/internal/visuals/animated-image/fixed-image-cache.cpp
dali-toolkit/internal/visuals/animated-image/image-cache.cpp
dali-toolkit/internal/visuals/animated-image/image-cache.h
dali-toolkit/internal/visuals/animated-image/rolling-gif-image-cache.cpp
dali-toolkit/internal/visuals/animated-image/rolling-image-cache.cpp
dali-toolkit/internal/visuals/border/border-visual.cpp
dali-toolkit/internal/visuals/color/color-visual.cpp
dali-toolkit/internal/visuals/gradient/gradient-visual.cpp
dali-toolkit/internal/visuals/image/image-visual.cpp
dali-toolkit/internal/visuals/mesh/mesh-visual.cpp
dali-toolkit/internal/visuals/npatch/npatch-visual.cpp
dali-toolkit/internal/visuals/primitive/primitive-visual.cpp
dali-toolkit/internal/visuals/primitive/primitive-visual.h
dali-toolkit/internal/visuals/text/text-visual.cpp
dali-toolkit/internal/visuals/text/text-visual.h
dali-toolkit/internal/visuals/texture-manager-impl.cpp
dali-toolkit/internal/visuals/texture-manager-impl.h
dali-toolkit/internal/visuals/visual-base-data-impl.cpp
dali-toolkit/internal/visuals/visual-base-data-impl.h
dali-toolkit/internal/visuals/visual-base-impl.cpp
dali-toolkit/internal/visuals/visual-factory-impl.cpp
dali-toolkit/internal/visuals/wireframe/wireframe-visual.cpp
dali-toolkit/public-api/accessibility-manager/accessibility-manager.h
dali-toolkit/public-api/controls/flex-container/flex-container.h
dali-toolkit/public-api/controls/video-view/video-view.cpp
dali-toolkit/public-api/controls/video-view/video-view.h [changed mode: 0644->0755]
dali-toolkit/public-api/dali-toolkit-version.cpp
dali-toolkit/public-api/visuals/primitive-visual-properties.h
dali-toolkit/third-party/nanosvg/nanosvg.cc
doc/dali-toolkit-doc.h
packaging/dali-toolkit.spec

index 64f876b..8b2160f 100755 (executable)
@@ -32,6 +32,7 @@ SET(TC_SOURCES
 
 # Append list of test harness files (Won't get parsed for test cases)
 LIST(APPEND TC_SOURCES
+   ../dali-toolkit/dali-toolkit-test-utils/toolkit-adaptor.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-accessibility-adaptor.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-application.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-clipboard.cpp
index 48c4476..86edead 100644 (file)
@@ -706,7 +706,7 @@ int UtcDaliTextLayoutSmallTextArea02(void)
   fontDescriptionRuns.PushBack( fontDescriptionRun );
   Size textArea(1.f, 1.f);
   Size layoutSize(80.f, 20.f);
-  float positions[] = { 1.f, -12.f, 12.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f, -0.f, 40.f, -9.f, 51.f, -9.f, 61.f, -9.f, 67.f, -13.f, 70.f, -13.f };
+  float positions[] = { 1.f, -12.f, 11.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f, -0.f, 40.f, -9.f, 51.f, -9.f, 61.f, -9.f, 67.f, -13.f, 70.f, -13.f };
   struct LineRun line =
   {
     { 0u, 11u },
@@ -792,8 +792,8 @@ int UtcDaliTextLayoutMultilineText01(void)
   Size layoutSize(95.f, 97.f);
   float positions[] =
   {
-    1.f, -12.f, 12.f,  -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f,  -0.f, 40.f, -9.f, 51.f,  -9.f, 61.f, -9.f, 67.f, -13.f, 70.f, -13.f, 79.f, -0.f,
-    0.f, -13.f, 10.f,  -9.f, 18.f,  -9.f, 30.f,  -9.f, 39.f, -3.f, 42.f, -12.f,
+    1.f, -12.f, 11.f,  -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f,  -0.f, 40.f, -9.f, 51.f,  -9.f, 61.f, -9.f, 67.f, -13.f, 70.f, -13.f, 79.f, -0.f,
+    0.f, -13.f,  9.f,  -9.f, 18.f,  -9.f, 30.f,  -9.f, 39.f, -2.f, 42.f, -12.f,
     1.f, -12.f,  9.f,  -9.f, 17.f,  -9.f, 27.f,  -9.f, 36.f, -9.f, 45.f, -11.f, 51.f, -0.f,
     1.f, -12.f, 11.f, -12.f, 15.f, -12.f, 26.f,  -9.f, 35.f, -9.f, 41.f,  -9.f, 50.f, -9.f, 59.f, -11.f, 65.f, -0.f,
     1.f, -12.f,  5.f, -12.f,  9.f,  -9.f, 19.f,  -9.f, 28.f, -9.f, 35.f,  -0.f, 41.f, -9.f, 50.f, -12.f, 54.f, -0.f, 59.f, -11.f, 66.f,  -9.f, 75.f, -9.f, 83.f, -11.f, 91.f, -2.f
@@ -802,10 +802,10 @@ int UtcDaliTextLayoutMultilineText01(void)
   {
     { 0u, 12u },
     { 0u, 12u },
-    81.f,
+    80.f,
     15.f,
     -5.f,
-    3.f,
+    4.f,
     0.f,
     0.f,
     false,
@@ -988,24 +988,24 @@ int UtcDaliTextLayoutMultilineText02(void)
   fontDescriptionRuns.PushBack( fontDescriptionRun4 );
   fontDescriptionRuns.PushBack( fontDescriptionRun5 );
   Size textArea(100.f, 300.f);
-  Size layoutSize(81.f, 120.f);
+  Size layoutSize(80.f, 120.f);
   float positions[] =
   {
-    1.f, -12.f, 12.f,  -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f,  -0.f, 40.f,  -9.f, 51.f,  -9.f, 61.f,  -9.f, 67.f, -13.f, 70.f, -13.f, 79.f, -0.f,
-    0.f, -13.f, 10.f,  -9.f, 18.f,  -9.f, 30.f,  -9.f, 39.f, -0.f, 44.f, -10.f, 55.f, -13.f, 62.f, -10.f, 67.f, -10.f, 75.f,  -0.f,
-    1.f, -10.f,  9.f, -10.f, 14.f, -13.f, 22.f, -10.f, 30.f, -3.f, 33.f, -12.f,
+    1.f, -12.f, 11.f,  -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f,  -0.f, 40.f,  -9.f, 51.f,  -9.f, 61.f,  -9.f, 67.f, -13.f, 70.f, -13.f, 79.f, -0.f,
+    0.f, -13.f,  9.f,  -9.f, 18.f,  -9.f, 30.f,  -9.f, 39.f, -0.f, 44.f, -10.f, 55.f, -13.f, 62.f, -10.f, 67.f, -10.f, 75.f,  -0.f,
+    1.f, -10.f,  9.f, -10.f, 14.f, -13.f, 22.f, -10.f, 30.f, -2.f, 33.f, -12.f,
     1.f, -10.f, 12.f, -13.f, 19.f, -10.f, 24.f, -10.f, 32.f, -0.f, 37.f, -10.f, 45.f, -10.f, 50.f, -13.f, 58.f, -10.f, 66.f,  -0.f,
-    1.f, -13.f, 10.f,  -9.f, 18.f, -13.f, 22.f, -13.f, 25.f, -9.f, 34.f,  -0.f, 38.f,  -9.f, 49.f,  -9.f, 59.f,  -9.f, 65.f, -13.f, 68.f, -13.f, 77.f, -0.f,
-    0.f, -13.f, 10.f,  -9.f, 18.f,  -9.f, 30.f,  -9.f, 39.f, -3.f,
+    1.f, -13.f,  9.f,  -9.f, 18.f, -13.f, 22.f, -13.f, 25.f, -9.f, 34.f,  -0.f, 38.f,  -9.f, 49.f,  -9.f, 59.f,  -9.f, 65.f, -13.f, 68.f, -13.f, 77.f, -0.f,
+    0.f, -13.f,  9.f,  -9.f, 18.f,  -9.f, 30.f,  -9.f, 39.f, -2.f,
   };
   struct LineRun line0 =
   {
     { 0u, 12u },
     { 0u, 12u },
-    81.f,
+    80.f,
     15.f,
     -5.f,
-    3.f,
+    4.f,
     0.f,
     0.f,
     false,
@@ -1054,10 +1054,10 @@ int UtcDaliTextLayoutMultilineText02(void)
   {
     { 38u, 12u },
     { 38u, 12u },
-    79.f,
+    78.f,
     15.f,
     -5.f,
-    3.f,
+    4.f,
     0.f,
     0.f,
     false,
@@ -1141,15 +1141,15 @@ int UtcDaliTextLayoutMultilineText03(void)
   Size layoutSize(96.f, 60.f);
   float positions[] =
   {
-    1.f, -12.f, 12.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f,  -9.f, 36.f,  -9.f, 47.f, -9.f, 57.f, -9.f, 63.f, -13.f, 66.f, -13.f, 75.f, -13.f, 85.f,  -9.f,
-    1.f,  -9.f, 13.f, -9.f, 23.f, -13.f, 32.f,  -9.f, 40.f, -13.f, 44.f, -13.f, 47.f, -9.f, 56.f, -9.f, 67.f,  -9.f, 77.f,  -9.f, 83.f, -13.f, 86.f, -13.f,
-    0.f, -13.f, 10.f, -9.f, 18.f,  -9.f, 30.f,  -9.f, 39.f,  -3.f,
+    1.f, -12.f, 11.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f,  -9.f, 36.f,  -9.f, 47.f, -9.f, 57.f, -9.f, 63.f, -13.f, 66.f, -13.f, 75.f, -13.f, 84.f,  -9.f,
+    1.f,  -9.f, 13.f, -9.f, 23.f, -13.f, 31.f,  -9.f, 40.f, -13.f, 44.f, -13.f, 47.f, -9.f, 56.f, -9.f, 67.f,  -9.f, 77.f,  -9.f, 83.f, -13.f, 86.f, -13.f,
+    0.f, -13.f,  9.f, -9.f, 18.f,  -9.f, 30.f,  -9.f, 39.f,  -2.f,
   };
   struct LineRun line0 =
   {
     { 0u, 12u },
     { 0u, 12u },
-    94.f,
+    93.f,
     15.f,
     -5.f,
     0.f,
@@ -1245,7 +1245,7 @@ int UtcDaliTextLayoutMultilineText04(void)
   Size layoutSize(83.f, 40.f);
   float positions[] =
   {
-    1.f, -12.f, 12.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f, -0.f, 40.f, -9.f, 51.f, -9.f, 61.f, -9.f, 67.f, -13.f, 70.f, -13.f, 79.f, -3.f, 82.f, -12.f
+    1.f, -12.f, 11.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f, -0.f, 40.f, -9.f, 51.f, -9.f, 61.f, -9.f, 67.f, -13.f, 70.f, -13.f, 79.f, -2.f, 82.f, -12.f
   };
   struct LineRun line0 =
   {
@@ -1359,8 +1359,8 @@ int UtcDaliTextLayoutMultilineText05(void)
   Size layoutSize(88.f, 53.f);
   float positions[] =
   {
-    1.f, -12.f, 12.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f, -0.f, 40.f, -14.f, 59.f, -9.f, 69.f, -9.f, 75.f, -13.f, 78.f, -13.f, 87.f, -0.f,
-    0.f, -13.f, 10.f, -9.f, 18.f,  -9.f, 30.f,  -9.f, 39.f, -3.f
+    1.f, -12.f, 11.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f, -0.f, 40.f, -14.f, 59.f, -9.f, 69.f, -9.f, 75.f, -13.f, 78.f, -13.f, 87.f, -0.f,
+    0.f, -13.f,  9.f, -9.f, 18.f,  -9.f, 30.f,  -9.f, 39.f, -2.f
   };
   struct LineRun line0 =
   {
@@ -1674,34 +1674,34 @@ int UtcDaliTextUpdateLayout01(void)
   Size layoutSize(92.f, 380.f);
   float positions[] =
   {
-    1.f, -12.f, 12.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f, -0.f, 40.f, -9.f, 51.f, -9.f, 61.f, -9.f, 67.f, -13.f, 70.f, -13.f, 79.f, -0.f,
-    0.f, -13.f, 10.f, -9.f, 18.f, -9.f, 30.f, -9.f, 39.f, -0.f, 44.f, -10.f, 55.f, -13.f, 62.f, -10.f, 67.f, -10.f, 75.f, -0.f,
-    1.f, -10.f, 9.f, -10.f, 14.f, -13.f, 22.f, -10.f, 30.f, -3.f, 33.f, -12.f,
-    0.f, -8.f, 7.f, -6.f, 12.f, -7.f, 18.f, -7.f, 23.f, -11.f, 25.f, -0.f, 27.f, -7.f, 32.f, -11.f, 33.f, -11.f, 37.f, -8.f, 44.f, -11.f, 45.f, -11.f, 49.f, -8.f, 55.f, -0.f, 59.f, -13.f, 68.f, -9.f, 76.f, -13.f, 80.f, -13.f, 83.f, -9.f, 92.f, -0.f,
+    1.f, -12.f, 11.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f, -0.f, 40.f, -9.f, 51.f, -9.f, 61.f, -9.f, 67.f, -13.f, 70.f, -13.f, 79.f, -0.f,
+    0.f, -13.f,  9.f, -9.f, 18.f, -9.f, 30.f, -9.f, 39.f, -0.f, 44.f, -10.f, 55.f, -13.f, 62.f, -10.f, 67.f, -10.f, 75.f, -0.f,
+    1.f, -10.f, 9.f, -10.f, 14.f, -13.f, 22.f, -10.f, 30.f, -2.f, 33.f, -12.f,
+    0.f, -8.f, 7.f, -6.f, 12.f, -8.f, 18.f, -7.f, 23.f, -11.f, 25.f, -0.f, 27.f, -7.f, 32.f, -11.f, 33.f, -11.f, 36.f, -8.f, 44.f, -11.f, 45.f, -11.f, 49.f, -8.f, 55.f, -0.f, 59.f, -13.f, 67.f, -9.f, 76.f, -13.f, 80.f, -13.f, 83.f, -9.f, 92.f, -0.f,
     0.f, -9.f, 11.f, -9.f, 21.f, -9.f, 27.f, -13.f, 30.f, -13.f, 39.f, -0.f, 44.f, -10.f, 55.f, -13.f, 62.f, -10.f, 67.f, -10.f, 75.f, -0.f,
     1.f, -10.f, 9.f, -10.f, 14.f, -13.f, 22.f, -10.f, 30.f, -0.f,
     1.f, -10.f, 12.f, -13.f, 19.f, -10.f, 24.f, -10.f, 32.f, -0.f, 37.f, -10.f, 45.f, -10.f, 50.f, -13.f, 58.f, -10.f, 66.f, -0.f,
-    1.f, -13.f, 10.f, -9.f, 18.f, -13.f, 22.f, -13.f, 25.f, -9.f, 34.f, -0.f, 38.f, -9.f, 49.f, -9.f, 59.f, -9.f, 65.f, -13.f, 68.f, -13.f, 77.f, -0.f,
-    0.f, -13.f, 10.f, -9.f, 18.f, -9.f, 30.f, -9.f, 39.f, -3.f, 42.f, -12.f,
-    1.f, -13.f, 10.f, -9.f, 18.f, -13.f, 22.f, -13.f, 25.f, -9.f, 34.f, -0.f, 38.f, -9.f, 49.f, -9.f, 59.f, -9.f, 65.f, -13.f, 68.f, -13.f, 77.f, -0.f,
-    0.f, -8.f, 7.f, -6.f, 12.f, -7.f, 18.f, -7.f, 23.f, -11.f, 25.f, -0.f, 27.f, -7.f, 32.f, -11.f, 33.f, -11.f, 37.f, -8.f, 44.f, -11.f, 45.f, -11.f, 49.f, -8.f, 55.f, -0.f, 59.f, -10.f, 70.f, -13.f, 77.f, -10.f, 82.f, -10.f, 90.f, -0.f,
+    1.f, -13.f,  9.f, -9.f, 18.f, -13.f, 22.f, -13.f, 25.f, -9.f, 34.f, -0.f, 38.f, -9.f, 49.f, -9.f, 59.f, -9.f, 65.f, -13.f, 68.f, -13.f, 77.f, -0.f,
+    0.f, -13.f,  9.f, -9.f, 18.f, -9.f, 30.f, -9.f, 39.f, -2.f, 42.f, -12.f,
+    1.f, -13.f,  9.f, -9.f, 18.f, -13.f, 22.f, -13.f, 25.f, -9.f, 34.f, -0.f, 38.f, -9.f, 49.f, -9.f, 59.f, -9.f, 65.f, -13.f, 68.f, -13.f, 77.f, -0.f,
+    0.f, -8.f, 7.f, -6.f, 12.f, -8.f, 18.f, -7.f, 23.f, -11.f, 25.f, -0.f, 27.f, -7.f, 32.f, -11.f, 33.f, -11.f, 36.f, -8.f, 44.f, -11.f, 45.f, -11.f, 49.f, -8.f, 55.f, -0.f, 59.f, -10.f, 70.f, -13.f, 77.f, -10.f, 82.f, -10.f, 90.f, -0.f,
     1.f, -10.f, 9.f, -10.f, 14.f, -13.f, 22.f, -10.f, 30.f, -0.f,
-    1.f, -12.f, 12.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f, -0.f, 40.f, -9.f, 51.f, -9.f, 61.f, -9.f, 67.f, -13.f, 70.f, -13.f, 79.f, -0.f,
-    0.f, -13.f, 10.f, -9.f, 18.f, -9.f, 30.f, -9.f, 39.f, -0.f, 44.f, -10.f, 55.f, -13.f, 62.f, -10.f, 67.f, -10.f, 75.f, -0.f,
-    1.f, -10.f, 9.f, -10.f, 14.f, -13.f, 22.f, -10.f, 30.f, -3.f, 33.f, -12.f,
+    1.f, -12.f, 11.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f, -0.f, 40.f, -9.f, 51.f, -9.f, 61.f, -9.f, 67.f, -13.f, 70.f, -13.f, 79.f, -0.f,
+    0.f, -13.f,  9.f, -9.f, 18.f, -9.f, 30.f, -9.f, 39.f, -0.f, 44.f, -10.f, 55.f, -13.f, 62.f, -10.f, 67.f, -10.f, 75.f, -0.f,
+    1.f, -10.f, 9.f, -10.f, 14.f, -13.f, 22.f, -10.f, 30.f, -2.f, 33.f, -12.f,
     1.f, -10.f, 12.f, -13.f, 19.f, -10.f, 24.f, -10.f, 32.f, -0.f, 37.f, -10.f, 45.f, -10.f, 50.f, -13.f, 58.f, -10.f, 66.f, -0.f,
-    1.f, -13.f, 10.f, -9.f, 18.f, -13.f, 22.f, -13.f, 25.f, -9.f, 34.f, -0.f, 38.f, -9.f, 49.f, -9.f, 59.f, -9.f, 65.f, -13.f, 68.f, -13.f, 77.f, -0.f,
-    0.f, -8.f, 7.f, -6.f, 12.f, -7.f, 18.f, -7.f, 23.f, -11.f, 25.f, -0.f, 27.f, -7.f, 32.f, -11.f, 33.f, -11.f, 37.f, -8.f, 44.f, -11.f, 45.f, -11.f, 49.f, -8.f, 55.f, -0.f,
+    1.f, -13.f,  9.f, -9.f, 18.f, -13.f, 22.f, -13.f, 25.f, -9.f, 34.f, -0.f, 38.f, -9.f, 49.f, -9.f, 59.f, -9.f, 65.f, -13.f, 68.f, -13.f, 77.f, -0.f,
+    0.f, -8.f, 7.f, -6.f, 12.f, -8.f, 18.f, -7.f, 23.f, -11.f, 25.f, -0.f, 27.f, -7.f, 32.f, -11.f, 33.f, -11.f, 36.f, -8.f, 44.f, -11.f, 45.f, -11.f, 49.f, -8.f, 55.f, -0.f,
   };
 
   struct LineRun line01 =
   {
     { 0u, 12u },
     { 0u, 12u },
-    81.f,
+    80.f,
     15.f,
     -5.f,
-    3.f,
+    4.f,
     0.f,
     0.f,
     false,
@@ -1789,11 +1789,11 @@ int UtcDaliTextUpdateLayout01(void)
   {
     { 74u, 12u },
     { 74u, 12u },
-    79.f,
+    78.f,
     15.f,
     -5.f,
-    3.f,
-    0.f,
+    4.f,
+    1.f,
     0.f,
     false,
     false
@@ -1854,10 +1854,10 @@ int UtcDaliTextUpdateLayout01(void)
   {
     { 128u, 12u },
     { 128u, 12u },
-    81.f,
+    80.f,
     15.f,
     -5.f,
-    3.f,
+    4.f,
     0.f,
     0.f,
     false,
@@ -2249,34 +2249,34 @@ int UtcDaliTextUpdateLayout02(void)
   Size layoutSize(92.f, 380.f);
   float positions[] =
   {
-    1.f, -12.f, 12.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f, -0.f, 40.f, -9.f, 51.f, -9.f, 61.f, -9.f, 67.f, -13.f, 70.f, -13.f, 79.f, -0.f,
-    0.f, -13.f, 10.f, -9.f, 18.f, -9.f, 30.f, -9.f, 39.f, -0.f, 44.f, -10.f, 55.f, -13.f, 62.f, -10.f, 67.f, -10.f, 75.f, -0.f,
-    1.f, -10.f, 9.f, -10.f, 14.f, -13.f, 22.f, -10.f, 30.f, -3.f, 33.f, -12.f,
-    0.f, -8.f, 7.f, -6.f, 12.f, -7.f, 18.f, -7.f, 23.f, -11.f, 25.f, -0.f, 27.f, -7.f, 32.f, -11.f, 33.f, -11.f, 37.f, -8.f, 44.f, -11.f, 45.f, -11.f, 49.f, -8.f, 55.f, -0.f, 59.f, -13.f, 68.f, -9.f, 76.f, -13.f, 80.f, -13.f, 83.f, -9.f, 92.f, -0.f,
+    1.f, -12.f, 11.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f, -0.f, 40.f, -9.f, 51.f, -9.f, 61.f, -9.f, 67.f, -13.f, 70.f, -13.f, 79.f, -0.f,
+    0.f, -13.f,  9.f, -9.f, 18.f, -9.f, 30.f, -9.f, 39.f, -0.f, 44.f, -10.f, 55.f, -13.f, 62.f, -10.f, 67.f, -10.f, 75.f, -0.f,
+    1.f, -10.f, 9.f, -10.f, 14.f, -13.f, 22.f, -10.f, 30.f, -2.f, 33.f, -12.f,
+    0.f, -8.f, 7.f, -6.f, 12.f, -8.f, 18.f, -7.f, 23.f, -11.f, 25.f, -0.f, 27.f, -7.f, 32.f, -11.f, 33.f, -11.f, 36.f, -8.f, 44.f, -11.f, 45.f, -11.f, 49.f, -8.f, 55.f, -0.f, 59.f, -13.f, 67.f, -9.f, 76.f, -13.f, 80.f, -13.f, 83.f, -9.f, 92.f, -0.f,
     0.f, -9.f, 11.f, -9.f, 21.f, -9.f, 27.f, -13.f, 30.f, -13.f, 39.f, -0.f, 44.f, -10.f, 55.f, -13.f, 62.f, -10.f, 67.f, -10.f, 75.f, -0.f,
     1.f, -10.f, 9.f, -10.f, 14.f, -13.f, 22.f, -10.f, 30.f, -0.f,
     1.f, -10.f, 12.f, -13.f, 19.f, -10.f, 24.f, -10.f, 32.f, -0.f, 37.f, -10.f, 45.f, -10.f, 50.f, -13.f, 58.f, -10.f, 66.f, -0.f,
-    1.f, -13.f, 10.f, -9.f, 18.f, -13.f, 22.f, -13.f, 25.f, -9.f, 34.f, -0.f, 38.f, -9.f, 49.f, -9.f, 59.f, -9.f, 65.f, -13.f, 68.f, -13.f, 77.f, -0.f,
-    0.f, -13.f, 10.f, -9.f, 18.f, -9.f, 30.f, -9.f, 39.f, -3.f, 42.f, -12.f,
-    1.f, -13.f, 10.f, -9.f, 18.f, -13.f, 22.f, -13.f, 25.f, -9.f, 34.f, -0.f, 38.f, -9.f, 49.f, -9.f, 59.f, -9.f, 65.f, -13.f, 68.f, -13.f, 77.f, -0.f,
-    0.f, -8.f, 7.f, -6.f, 12.f, -7.f, 18.f, -7.f, 23.f, -11.f, 25.f, -0.f, 27.f, -7.f, 32.f, -11.f, 33.f, -11.f, 37.f, -8.f, 44.f, -11.f, 45.f, -11.f, 49.f, -8.f, 55.f, -0.f, 59.f, -10.f, 70.f, -13.f, 77.f, -10.f, 82.f, -10.f, 90.f, -0.f,
+    1.f, -13.f,  9.f, -9.f, 18.f, -13.f, 22.f, -13.f, 25.f, -9.f, 34.f, -0.f, 38.f, -9.f, 49.f, -9.f, 59.f, -9.f, 65.f, -13.f, 68.f, -13.f, 77.f, -0.f,
+    0.f, -13.f,  9.f, -9.f, 18.f, -9.f, 30.f, -9.f, 39.f, -2.f, 42.f, -12.f,
+    1.f, -13.f,  9.f, -9.f, 18.f, -13.f, 22.f, -13.f, 25.f, -9.f, 34.f, -0.f, 38.f, -9.f, 49.f, -9.f, 59.f, -9.f, 65.f, -13.f, 68.f, -13.f, 77.f, -0.f,
+    0.f, -8.f, 7.f, -6.f, 12.f, -8.f, 18.f, -7.f, 23.f, -11.f, 25.f, -0.f, 27.f, -7.f, 32.f, -11.f, 33.f, -11.f, 36.f, -8.f, 44.f, -11.f, 45.f, -11.f, 49.f, -8.f, 55.f, -0.f, 59.f, -10.f, 70.f, -13.f, 77.f, -10.f, 82.f, -10.f, 90.f, -0.f,
     1.f, -10.f, 9.f, -10.f, 14.f, -13.f, 22.f, -10.f, 30.f, -0.f,
-    1.f, -12.f, 12.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f, -0.f, 40.f, -9.f, 51.f, -9.f, 61.f, -9.f, 67.f, -13.f, 70.f, -13.f, 79.f, -0.f,
-    0.f, -13.f, 10.f, -9.f, 18.f, -9.f, 30.f, -9.f, 39.f, -0.f, 44.f, -10.f, 55.f, -13.f, 62.f, -10.f, 67.f, -10.f, 75.f, -0.f,
-    1.f, -10.f, 9.f, -10.f, 14.f, -13.f, 22.f, -10.f, 30.f, -3.f, 33.f, -12.f,
+    1.f, -12.f, 11.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f, -0.f, 40.f, -9.f, 51.f, -9.f, 61.f, -9.f, 67.f, -13.f, 70.f, -13.f, 79.f, -0.f,
+    0.f, -13.f,  9.f, -9.f, 18.f, -9.f, 30.f, -9.f, 39.f, -0.f, 44.f, -10.f, 55.f, -13.f, 62.f, -10.f, 67.f, -10.f, 75.f, -0.f,
+    1.f, -10.f, 9.f, -10.f, 14.f, -13.f, 22.f, -10.f, 30.f, -2.f, 33.f, -12.f,
     1.f, -10.f, 12.f, -13.f, 19.f, -10.f, 24.f, -10.f, 32.f, -0.f, 37.f, -10.f, 45.f, -10.f, 50.f, -13.f, 58.f, -10.f, 66.f, -0.f,
-    1.f, -13.f, 10.f, -9.f, 18.f, -13.f, 22.f, -13.f, 25.f, -9.f, 34.f, -0.f, 38.f, -9.f, 49.f, -9.f, 59.f, -9.f, 65.f, -13.f, 68.f, -13.f, 77.f, -0.f,
-    0.f, -8.f, 7.f, -6.f, 12.f, -7.f, 18.f, -7.f, 23.f, -11.f, 25.f, -0.f, 27.f, -7.f, 32.f, -11.f, 33.f, -11.f, 37.f, -8.f, 44.f, -11.f, 45.f, -11.f, 49.f, -8.f, 55.f, -0.f,
+    1.f, -13.f,  9.f, -9.f, 18.f, -13.f, 22.f, -13.f, 25.f, -9.f, 34.f, -0.f, 38.f, -9.f, 49.f, -9.f, 59.f, -9.f, 65.f, -13.f, 68.f, -13.f, 77.f, -0.f,
+    0.f, -8.f, 7.f, -6.f, 12.f, -8.f, 18.f, -7.f, 23.f, -11.f, 25.f, -0.f, 27.f, -7.f, 32.f, -11.f, 33.f, -11.f, 36.f, -8.f, 44.f, -11.f, 45.f, -11.f, 49.f, -8.f, 55.f, -0.f,
   };
 
   struct LineRun line01 =
   {
     { 0u, 12u },
     { 0u, 12u },
-    81.f,
+    80.f,
     15.f,
     -5.f,
-    3.f,
+    4.f,
     0.f,
     0.f,
     false,
@@ -2364,11 +2364,11 @@ int UtcDaliTextUpdateLayout02(void)
   {
     { 74u, 12u },
     { 74u, 12u },
-    79.f,
+    78.f,
     15.f,
     -5.f,
-    3.f,
-    0.f,
+    4.f,
+    1.f,
     0.f,
     false,
     false
@@ -2429,10 +2429,10 @@ int UtcDaliTextUpdateLayout02(void)
   {
     { 128u, 12u },
     { 128u, 12u },
-    81.f,
+    80.f,
     15.f,
     -5.f,
-    3.f,
+    4.f,
     0.f,
     0.f,
     false,
@@ -2824,34 +2824,34 @@ int UtcDaliTextUpdateLayout03(void)
   Size layoutSize(92.f, 380.f);
   float positions[] =
   {
-    1.f, -12.f, 12.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f, -0.f, 40.f, -9.f, 51.f, -9.f, 61.f, -9.f, 67.f, -13.f, 70.f, -13.f, 79.f, -0.f,
-    0.f, -13.f, 10.f, -9.f, 18.f, -9.f, 30.f, -9.f, 39.f, -0.f, 44.f, -10.f, 55.f, -13.f, 62.f, -10.f, 67.f, -10.f, 75.f, -0.f,
-    1.f, -10.f, 9.f, -10.f, 14.f, -13.f, 22.f, -10.f, 30.f, -3.f, 33.f, -12.f,
-    0.f, -8.f, 7.f, -6.f, 12.f, -7.f, 18.f, -7.f, 23.f, -11.f, 25.f, -0.f, 27.f, -7.f, 32.f, -11.f, 33.f, -11.f, 37.f, -8.f, 44.f, -11.f, 45.f, -11.f, 49.f, -8.f, 55.f, -0.f, 59.f, -13.f, 68.f, -9.f, 76.f, -13.f, 80.f, -13.f, 83.f, -9.f, 92.f, -0.f,
+    1.f, -12.f, 11.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f, -0.f, 40.f, -9.f, 51.f, -9.f, 61.f, -9.f, 67.f, -13.f, 70.f, -13.f, 79.f, -0.f,
+    0.f, -13.f,  9.f, -9.f, 18.f, -9.f, 30.f, -9.f, 39.f, -0.f, 44.f, -10.f, 55.f, -13.f, 62.f, -10.f, 67.f, -10.f, 75.f, -0.f,
+    1.f, -10.f, 9.f, -10.f, 14.f, -13.f, 22.f, -10.f, 30.f, -2.f, 33.f, -12.f,
+    0.f, -8.f, 7.f, -6.f, 12.f, -8.f, 18.f, -7.f, 23.f, -11.f, 25.f, -0.f, 27.f, -7.f, 32.f, -11.f, 33.f, -11.f, 36.f, -8.f, 44.f, -11.f, 45.f, -11.f, 49.f, -8.f, 55.f, -0.f, 59.f, -13.f, 67.f, -9.f, 76.f, -13.f, 80.f, -13.f, 83.f, -9.f, 92.f, -0.f,
     0.f, -9.f, 11.f, -9.f, 21.f, -9.f, 27.f, -13.f, 30.f, -13.f, 39.f, -0.f, 44.f, -10.f, 55.f, -13.f, 62.f, -10.f, 67.f, -10.f, 75.f, -0.f,
     1.f, -10.f, 9.f, -10.f, 14.f, -13.f, 22.f, -10.f, 30.f, -0.f,
     1.f, -10.f, 12.f, -13.f, 19.f, -10.f, 24.f, -10.f, 32.f, -0.f, 37.f, -10.f, 45.f, -10.f, 50.f, -13.f, 58.f, -10.f, 66.f, -0.f,
-    1.f, -13.f, 10.f, -9.f, 18.f, -13.f, 22.f, -13.f, 25.f, -9.f, 34.f, -0.f, 38.f, -9.f, 49.f, -9.f, 59.f, -9.f, 65.f, -13.f, 68.f, -13.f, 77.f, -0.f,
-    0.f, -13.f, 10.f, -9.f, 18.f, -9.f, 30.f, -9.f, 39.f, -3.f, 42.f, -12.f,
-    1.f, -13.f, 10.f, -9.f, 18.f, -13.f, 22.f, -13.f, 25.f, -9.f, 34.f, -0.f, 38.f, -9.f, 49.f, -9.f, 59.f, -9.f, 65.f, -13.f, 68.f, -13.f, 77.f, -0.f,
-    0.f, -8.f, 7.f, -6.f, 12.f, -7.f, 18.f, -7.f, 23.f, -11.f, 25.f, -0.f, 27.f, -7.f, 32.f, -11.f, 33.f, -11.f, 37.f, -8.f, 44.f, -11.f, 45.f, -11.f, 49.f, -8.f, 55.f, -0.f, 59.f, -10.f, 70.f, -13.f, 77.f, -10.f, 82.f, -10.f, 90.f, -0.f,
+    1.f, -13.f,  9.f, -9.f, 18.f, -13.f, 22.f, -13.f, 25.f, -9.f, 34.f, -0.f, 38.f, -9.f, 49.f, -9.f, 59.f, -9.f, 65.f, -13.f, 68.f, -13.f, 77.f, -0.f,
+    0.f, -13.f,  9.f, -9.f, 18.f, -9.f, 30.f, -9.f, 39.f, -2.f, 42.f, -12.f,
+    1.f, -13.f,  9.f, -9.f, 18.f, -13.f, 22.f, -13.f, 25.f, -9.f, 34.f, -0.f, 38.f, -9.f, 49.f, -9.f, 59.f, -9.f, 65.f, -13.f, 68.f, -13.f, 77.f, -0.f,
+    0.f, -8.f, 7.f, -6.f, 12.f, -8.f, 18.f, -7.f, 23.f, -11.f, 25.f, -0.f, 27.f, -7.f, 32.f, -11.f, 33.f, -11.f, 36.f, -8.f, 44.f, -11.f, 45.f, -11.f, 49.f, -8.f, 55.f, -0.f, 59.f, -10.f, 70.f, -13.f, 77.f, -10.f, 82.f, -10.f, 90.f, -0.f,
     1.f, -10.f, 9.f, -10.f, 14.f, -13.f, 22.f, -10.f, 30.f, -0.f,
-    1.f, -12.f, 12.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f, -0.f, 40.f, -9.f, 51.f, -9.f, 61.f, -9.f, 67.f, -13.f, 70.f, -13.f, 79.f, -0.f,
-    0.f, -13.f, 10.f, -9.f, 18.f, -9.f, 30.f, -9.f, 39.f, -0.f, 44.f, -10.f, 55.f, -13.f, 62.f, -10.f, 67.f, -10.f, 75.f, -0.f,
-    1.f, -10.f, 9.f, -10.f, 14.f, -13.f, 22.f, -10.f, 30.f, -3.f, 33.f, -12.f,
+    1.f, -12.f, 11.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f, -0.f, 40.f, -9.f, 51.f, -9.f, 61.f, -9.f, 67.f, -13.f, 70.f, -13.f, 79.f, -0.f,
+    0.f, -13.f,  9.f, -9.f, 18.f, -9.f, 30.f, -9.f, 39.f, -0.f, 44.f, -10.f, 55.f, -13.f, 62.f, -10.f, 67.f, -10.f, 75.f, -0.f,
+    1.f, -10.f, 9.f, -10.f, 14.f, -13.f, 22.f, -10.f, 30.f, -2.f, 33.f, -12.f,
     1.f, -10.f, 12.f, -13.f, 19.f, -10.f, 24.f, -10.f, 32.f, -0.f, 37.f, -10.f, 45.f, -10.f, 50.f, -13.f, 58.f, -10.f, 66.f, -0.f,
-    1.f, -13.f, 10.f, -9.f, 18.f, -13.f, 22.f, -13.f, 25.f, -9.f, 34.f, -0.f, 38.f, -9.f, 49.f, -9.f, 59.f, -9.f, 65.f, -13.f, 68.f, -13.f, 77.f, -0.f,
-    0.f, -8.f, 7.f, -6.f, 12.f, -7.f, 18.f, -7.f, 23.f, -11.f, 25.f, -0.f, 27.f, -7.f, 32.f, -11.f, 33.f, -11.f, 37.f, -8.f, 44.f, -11.f, 45.f, -11.f, 49.f, -8.f, 55.f, -0.f,
+    1.f, -13.f,  9.f, -9.f, 18.f, -13.f, 22.f, -13.f, 25.f, -9.f, 34.f, -0.f, 38.f, -9.f, 49.f, -9.f, 59.f, -9.f, 65.f, -13.f, 68.f, -13.f, 77.f, -0.f,
+    0.f, -8.f, 7.f, -6.f, 12.f, -8.f, 18.f, -7.f, 23.f, -11.f, 25.f, -0.f, 27.f, -7.f, 32.f, -11.f, 33.f, -11.f, 36.f, -8.f, 44.f, -11.f, 45.f, -11.f, 49.f, -8.f, 55.f, -0.f,
   };
 
   struct LineRun line01 =
   {
     { 0u, 12u },
     { 0u, 12u },
-    81.f,
+    80.f,
     15.f,
     -5.f,
-    3.f,
+    4.f,
     0.f,
     0.f,
     false,
@@ -2939,11 +2939,11 @@ int UtcDaliTextUpdateLayout03(void)
   {
     { 74u, 12u },
     { 74u, 12u },
-    79.f,
+    78.f,
     15.f,
     -5.f,
-    3.f,
-    0.f,
+    4.f,
+    1.f,
     0.f,
     false,
     false
@@ -3004,10 +3004,10 @@ int UtcDaliTextUpdateLayout03(void)
   {
     { 128u, 12u },
     { 128u, 12u },
-    81.f,
+    80.f,
     15.f,
     -5.f,
-    3.f,
+    4.f,
     0.f,
     0.f,
     false,
@@ -3188,7 +3188,7 @@ int UtcDaliTextLayoutEllipsis01(void)
 
   float positions[] =
   {
-    1.f, -12.f, 12.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f, -0.f, 40.f, -9.f, 51.f, -9.f, 61.f, -9.f, 67.f, -13.f, 70.f, -13.f, 79.f, -0.f, 83.f, -13.f,
+    1.f, -12.f, 11.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f, -0.f, 40.f, -9.f, 51.f, -9.f, 61.f, -9.f, 67.f, -13.f, 70.f, -13.f, 79.f, -0.f, 83.f, -13.f,
   };
 
   Size textArea( 100.f, 50.f );
@@ -3251,10 +3251,10 @@ int UtcDaliTextLayoutEllipsis02(void)
   {
     { 0u, 12u },
     { 0u, 12u },
-    81.f,
+    80.f,
     15.f,
     -5.f,
-    3.f,
+    4.f,
     0.f,
     0.f,
     false,
@@ -3279,8 +3279,8 @@ int UtcDaliTextLayoutEllipsis02(void)
 
   float positions[] =
   {
-    1.f, -12.f, 12.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f, -0.f, 40.f, -9.f, 51.f, -9.f, 61.f, -9.f, 67.f, -13.f, 70.f, -13.f, 79.f, -0.f,
-    0.f, -13.f, 10.f, -9.f, 18.f, -9.f, 30.f, -9.f, 39.f, -0.f, 44.f, -13.f, 53.f, -9.f, 61.f, -13.f, 65.f, -13.f, 68.f, -9.f, 77.f, -0.f, 81.f, -9.f,
+    1.f, -12.f, 11.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f, -0.f, 40.f, -9.f, 51.f, -9.f, 61.f, -9.f, 67.f, -13.f, 70.f, -13.f, 79.f, -0.f,
+    0.f, -13.f,  9.f, -9.f, 18.f, -9.f, 30.f, -9.f, 39.f, -0.f, 44.f, -13.f, 52.f, -9.f, 61.f, -13.f, 65.f, -13.f, 68.f, -9.f, 77.f, -0.f, 81.f, -9.f,
   };
 
   Size textArea( 100.f, 50.f );
@@ -3423,7 +3423,7 @@ int UtcDaliTextLayoutEllipsis03(void)
 
   float positions[] =
   {
-    1.f, -10.f, 12.f, -13.f, 19.f, -10.f, 24.f, -10.f, 32.f, -0.f, 37.f, -10.f, 45.f, -10.f, 50.f, -13.f, 58.f, -10.f, 66.f, -0.f, 69.f, -8.f, 76.f, -6.f, 81.f, -7.f, 87.f, -7.f, 92.f, -11.f, 94.f, -0.f,
+    1.f, -10.f, 12.f, -13.f, 19.f, -10.f, 24.f, -10.f, 32.f, -0.f, 37.f, -10.f, 45.f, -10.f, 50.f, -13.f, 58.f, -10.f, 66.f, -0.f, 69.f, -8.f, 76.f, -6.f, 81.f, -8.f, 87.f, -7.f, 92.f, -11.f, 94.f, -0.f,
   };
 
   Size textArea( 100.f, 50.f );
@@ -3580,8 +3580,8 @@ int UtcDaliTextLayoutEllipsis04(void)
 
   float positions[] =
   {
-    1.f, -10.f, 12.f, -13.f, 19.f, -10.f, 24.f, -10.f, 32.f, -0.f, 37.f, -10.f, 45.f, -10.f, 50.f, -13.f, 58.f, -10.f, 66.f, -0.f, 69.f, -8.f, 76.f, -6.f, 81.f, -7.f, 87.f, -7.f, 92.f, -11.f, 94.f, -0.f,
-    0.f, -7.f, 5.f, -11.f, 6.f, -11.f, 10.f, -8.f, 17.f, -11.f, 18.f, -11.f, 22.f, -8.f, 28.f, -0.f, 32.f, -10.f, 43.f, -13.f, 50.f, -10.f, 55.f, -10.f, 63.f, -0.f, 68.f, -10.f, 76.f, -10.f, 81.f, -13.f, 89.f, -10.f, 97.f, -0.f,
+    1.f, -10.f, 12.f, -13.f, 19.f, -10.f, 24.f, -10.f, 32.f, -0.f, 37.f, -10.f, 45.f, -10.f, 50.f, -13.f, 58.f, -10.f, 66.f, -0.f, 69.f, -8.f, 76.f, -6.f, 81.f, -8.f, 87.f, -7.f, 92.f, -11.f, 94.f, -0.f,
+    0.f, -7.f, 5.f, -11.f, 6.f, -11.f, 9.f, -8.f, 17.f, -11.f, 18.f, -11.f, 22.f, -8.f, 28.f, -0.f, 32.f, -10.f, 43.f, -13.f, 50.f, -10.f, 55.f, -10.f, 63.f, -0.f, 68.f, -10.f, 76.f, -10.f, 81.f, -13.f, 89.f, -10.f, 97.f, -0.f,
   };
 
   Size textArea( 100.f, 50.f );
@@ -3717,7 +3717,7 @@ int UtcDaliTextReorderLayout01(void)
 
   float positions[] =
   {
-    1.f, -12.f, 12.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f, -0.f, 40.f, -9.f, 51.f, -9.f, 61.f, -9.f, 67.f, -13.f, 70.f, -13.f,
+    1.f, -12.f, 11.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f, -0.f, 40.f, -9.f, 51.f, -9.f, 61.f, -9.f, 67.f, -13.f, 70.f, -13.f,
   };
 
   Size textArea( 100.f, 300.f );
@@ -3837,12 +3837,12 @@ int UtcDaliTextReorderLayout02(void)
 
   float positions[] =
   {
-    87.f, -10.f, 79.f, -13.f, 74.f, -10.f, 66.f, -10.f, 61.f, -0.f, 53.f, -10.f, 48.f, -10.f, 41.f, -13.f, 32.f, -10.f, 27.f, -0.f, 20.f, -8.f, 15.f, -6.f, 8.f, -7.f, 5.f, -7.f, 4.f, -11.f, 0.f, -0.f,
-    23.f, -7.f, 22.f, -11.f, 17.f, -11.f, 12.f, -8.f, 10.f, -11.f, 5.f, -11.f, 0.f, -8.f, 0.f, -0.f,
-    0.f, -8.f, 7.f, -6.f, 12.f, -7.f, 18.f, -7.f, 23.f, -11.f, 25.f, -0.f, 27.f, -7.f, 32.f, -11.f, 33.f, -11.f, 37.f, -8.f, 44.f, -11.f, 45.f, -11.f, 49.f, -8.f, 55.f, -0.f, 59.f, -10.f, 70.f, -13.f, 77.f, -10.f, 82.f, -10.f, 90.f, -0.f,
+    87.f, -10.f, 79.f, -13.f, 74.f, -10.f, 66.f, -10.f, 61.f, -0.f, 53.f, -10.f, 48.f, -10.f, 41.f, -13.f, 32.f, -10.f, 27.f, -0.f, 20.f, -8.f, 15.f, -6.f, 8.f, -8.f, 5.f, -7.f, 4.f, -11.f, 0.f, -0.f,
+    23.f, -7.f, 22.f, -11.f, 17.f, -11.f, 11.f, -8.f, 10.f, -11.f, 5.f, -11.f, 0.f, -8.f, 0.f, -0.f,
+    0.f, -8.f, 7.f, -6.f, 12.f, -8.f, 18.f, -7.f, 23.f, -11.f, 25.f, -0.f, 27.f, -7.f, 32.f, -11.f, 33.f, -11.f, 36.f, -8.f, 44.f, -11.f, 45.f, -11.f, 49.f, -8.f, 55.f, -0.f, 59.f, -10.f, 70.f, -13.f, 77.f, -10.f, 82.f, -10.f, 90.f, -0.f,
     1.f, -10.f, 9.f, -10.f, 14.f, -13.f, 22.f, -10.f, 30.f, -0.f,
-    1.f, -10.f, 12.f, -13.f, 19.f, -10.f, 24.f, -10.f, 32.f, -0.f, 37.f, -10.f, 45.f, -10.f, 50.f, -13.f, 58.f, -10.f, 66.f, -0.f, 69.f, -8.f, 76.f, -6.f, 81.f, -7.f, 87.f, -7.f, 92.f, -11.f, 94.f, -0.f,
-    0.f, -7.f, 5.f, -11.f, 6.f, -11.f, 10.f, -8.f, 17.f, -11.f, 18.f, -11.f, 22.f, -8.f, 30.f, -2.f,
+    1.f, -10.f, 12.f, -13.f, 19.f, -10.f, 24.f, -10.f, 32.f, -0.f, 37.f, -10.f, 45.f, -10.f, 50.f, -13.f, 58.f, -10.f, 66.f, -0.f, 69.f, -8.f, 76.f, -6.f, 81.f, -8.f, 87.f, -7.f, 92.f, -11.f, 94.f, -0.f,
+    0.f, -7.f, 5.f, -11.f, 6.f, -11.f, 9.f, -8.f, 17.f, -11.f, 18.f, -11.f, 22.f, -8.f, 30.f, -2.f,
   };
 
   Size textArea( 100.f, 300.f );
@@ -3964,12 +3964,12 @@ int UtcDaliTextReorderLayout03(void)
 
   float positions[] =
   {
-    1.f, -10.f, 12.f, -13.f, 19.f, -10.f, 24.f, -10.f, 32.f, -0.f, 37.f, -10.f, 45.f, -10.f, 50.f, -13.f, 58.f, -10.f, 66.f, -0.f, 69.f, -8.f, 76.f, -6.f, 81.f, -7.f, 87.f, -7.f, 92.f, -11.f, 94.f, -0.f,
-    0.f, -7.f,  5.f, -11.f, 6.f, -11.f, 10.f, -8.f, 17.f, -11.f, 18.f, -11.f, 22.f, -8.f, 28.f, -0.f,
-    86.f, -8.f, 81.f, -6.f, 74.f, -7.f, 71.f, -7.f, 70.f, -11.f, 66.f, -0.f, 62.f, -7.f, 61.f, -11.f, 56.f, -11.f, 51.f, -8.f, 49.f, -11.f, 44.f, -11.f, 39.f, -8.f, 36.f, -0.f, 26.f, -10.f, 18.f, -13.f, 13.f, -10.f, 5.f, -10.f, 0.f, -0.f,
+    1.f, -10.f, 12.f, -13.f, 19.f, -10.f, 24.f, -10.f, 32.f, -0.f, 37.f, -10.f, 45.f, -10.f, 50.f, -13.f, 58.f, -10.f, 66.f, -0.f, 69.f, -8.f, 76.f, -6.f, 81.f, -8.f, 87.f, -7.f, 92.f, -11.f, 94.f, -0.f,
+    0.f, -7.f,  5.f, -11.f, 6.f, -11.f, 9.f, -8.f, 17.f, -11.f, 18.f, -11.f, 22.f, -8.f, 28.f, -0.f,
+    86.f, -8.f, 81.f, -6.f, 74.f, -8.f, 71.f, -7.f, 70.f, -11.f, 66.f, -0.f, 62.f, -7.f, 61.f, -11.f, 56.f, -11.f, 50.f, -8.f, 49.f, -11.f, 44.f, -11.f, 39.f, -8.f, 36.f, -0.f, 26.f, -10.f, 18.f, -13.f, 13.f, -10.f, 5.f, -10.f, 0.f, -0.f,
     22.f, -10.f, 17.f, -10.f, 10.f, -13.f, 1.f, -10.f, 0.f, -0.f,
-    1.f, -10.f, 12.f, -13.f, 19.f, -10.f, 24.f, -10.f, 32.f, -0.f, 37.f, -10.f, 45.f, -10.f, 50.f, -13.f, 58.f, -10.f, 66.f, -0.f, 69.f, -8.f, 76.f, -6.f, 81.f, -7.f, 87.f, -7.f, 92.f, -11.f, 94.f, -0.f,
-    0.f, -7.f, 5.f, -11.f, 6.f, -11.f, 10.f, -8.f, 17.f, -11.f, 18.f, -11.f, 22.f, -8.f, 30.f, -2.f,
+    1.f, -10.f, 12.f, -13.f, 19.f, -10.f, 24.f, -10.f, 32.f, -0.f, 37.f, -10.f, 45.f, -10.f, 50.f, -13.f, 58.f, -10.f, 66.f, -0.f, 69.f, -8.f, 76.f, -6.f, 81.f, -8.f, 87.f, -7.f, 92.f, -11.f, 94.f, -0.f,
+    0.f, -7.f, 5.f, -11.f, 6.f, -11.f, 9.f, -8.f, 17.f, -11.f, 18.f, -11.f, 22.f, -8.f, 30.f, -2.f,
   };
 
   Size textArea( 100.f, 300.f );
@@ -4091,12 +4091,12 @@ int UtcDaliTextReorderLayout04(void)
 
   float positions[] =
   {
-    1.f, -10.f, 12.f, -13.f, 19.f, -10.f, 24.f, -10.f, 32.f, -0.f, 37.f, -10.f, 45.f, -10.f, 50.f, -13.f, 58.f, -10.f, 66.f, -0.f, 69.f, -8.f, 76.f, -6.f, 81.f, -7.f, 87.f, -7.f, 92.f, -11.f, 94.f, -0.f,
-    0.f, -7.f, 5.f, -11.f, 6.f, -11.f, 10.f, -8.f, 17.f, -11.f, 18.f, -11.f, 22.f, -8.f, 28.f, -0.f,
-    0.f, -8.f, 7.f, -6.f, 12.f, -7.f, 18.f, -7.f, 23.f, -11.f, 25.f, -0.f, 27.f, -7.f, 32.f, -11.f, 33.f, -11.f, 37.f, -8.f, 44.f, -11.f, 45.f, -11.f, 49.f, -8.f, 55.f, -0.f, 59.f, -10.f, 70.f, -13.f, 77.f, -10.f, 82.f, -10.f, 90.f, -0.f,
+    1.f, -10.f, 12.f, -13.f, 19.f, -10.f, 24.f, -10.f, 32.f, -0.f, 37.f, -10.f, 45.f, -10.f, 50.f, -13.f, 58.f, -10.f, 66.f, -0.f, 69.f, -8.f, 76.f, -6.f, 81.f, -8.f, 87.f, -7.f, 92.f, -11.f, 94.f, -0.f,
+    0.f, -7.f, 5.f, -11.f, 6.f, -11.f, 9.f, -8.f, 17.f, -11.f, 18.f, -11.f, 22.f, -8.f, 28.f, -0.f,
+    0.f, -8.f, 7.f, -6.f, 12.f, -8.f, 18.f, -7.f, 23.f, -11.f, 25.f, -0.f, 27.f, -7.f, 32.f, -11.f, 33.f, -11.f, 36.f, -8.f, 44.f, -11.f, 45.f, -11.f, 49.f, -8.f, 55.f, -0.f, 59.f, -10.f, 70.f, -13.f, 77.f, -10.f, 82.f, -10.f, 90.f, -0.f,
     1.f, -10.f, 9.f, -10.f, 14.f, -13.f, 22.f, -10.f, 30.f, -0.f,
-    87.f, -10.f, 79.f, -13.f, 74.f, -10.f, 66.f, -10.f, 61.f, -0.f, 53.f, -10.f, 48.f, -10.f, 41.f, -13.f, 32.f, -10.f, 27.f, -0.f, 20.f, -8.f, 15.f, -6.f, 8.f, -7.f, 5.f, -7.f, 4.f, -11.f, 0.f, -0.f,
-    28.f, -7.f, 27.f, -11.f, 22.f, -11.f, 17.f, -8.f, 15.f, -11.f, 10.f, -11.f, 5.f, -8.f, 2.f, -2.f,
+    87.f, -10.f, 79.f, -13.f, 74.f, -10.f, 66.f, -10.f, 61.f, -0.f, 53.f, -10.f, 48.f, -10.f, 41.f, -13.f, 32.f, -10.f, 27.f, -0.f, 20.f, -8.f, 15.f, -6.f, 8.f, -8.f, 5.f, -7.f, 4.f, -11.f, 0.f, -0.f,
+    28.f, -7.f, 27.f, -11.f, 22.f, -11.f, 16.f, -8.f, 15.f, -11.f, 10.f, -11.f, 5.f, -8.f, 2.f, -2.f,
   };
 
   Size textArea( 100.f, 300.f );
index c3f0b9b..dbb0e94 100644 (file)
@@ -238,7 +238,7 @@ bool ScriptsTest( const ScriptsData& data )
 
     if( scriptRun1.script != scriptRun2.script )
     {
-      tet_printf("ScriptsTest FAIL: different script. %s, should be %s\n", TextAbstraction::ScriptName[scriptRun1.script], TextAbstraction::ScriptName[scriptRun2.script] );
+      tet_printf("ScriptsTest FAIL: script index: %u, different script. %s, should be %s\n", index, TextAbstraction::ScriptName[scriptRun1.script], TextAbstraction::ScriptName[scriptRun2.script] );
       return false;
     }
   }
@@ -959,7 +959,7 @@ int UtcDaliTextMultiLanguageSetScripts(void)
       0u,
       3u,
     },
-    TextAbstraction::LATIN
+    TextAbstraction::UNKNOWN
   };
   ScriptRun scriptRun1101 =
   {
@@ -967,7 +967,7 @@ int UtcDaliTextMultiLanguageSetScripts(void)
       3u,
       3u,
     },
-    TextAbstraction::LATIN
+    TextAbstraction::UNKNOWN
   };
   ScriptRun scriptRun1102 =
   {
@@ -983,7 +983,7 @@ int UtcDaliTextMultiLanguageSetScripts(void)
       25u,
       3u,
     },
-    TextAbstraction::LATIN
+    TextAbstraction::UNKNOWN
   };
   ScriptRun scriptRun1104 =
   {
@@ -991,7 +991,7 @@ int UtcDaliTextMultiLanguageSetScripts(void)
       28u,
       3u,
     },
-    TextAbstraction::LATIN
+    TextAbstraction::UNKNOWN
   };
   ScriptRun scriptRun1105 =
   {
@@ -1007,7 +1007,7 @@ int UtcDaliTextMultiLanguageSetScripts(void)
       46u,
       2u,
     },
-    TextAbstraction::LATIN
+    TextAbstraction::UNKNOWN
   };
   ScriptRun scriptRun1107 =
   {
@@ -1015,7 +1015,7 @@ int UtcDaliTextMultiLanguageSetScripts(void)
       48u,
       2u,
     },
-    TextAbstraction::LATIN
+    TextAbstraction::UNKNOWN
   };
   ScriptRun scriptRun1108 =
   {
@@ -1023,7 +1023,7 @@ int UtcDaliTextMultiLanguageSetScripts(void)
       50u,
       2u,
     },
-    TextAbstraction::LATIN
+    TextAbstraction::UNKNOWN
   };
   scriptRuns11.PushBack( scriptRun1100 );
   scriptRuns11.PushBack( scriptRun1101 );
@@ -1043,7 +1043,7 @@ int UtcDaliTextMultiLanguageSetScripts(void)
       0u,
       3u,
     },
-    TextAbstraction::LATIN
+    TextAbstraction::UNKNOWN
   };
   ScriptRun scriptRun1201 =
   {
@@ -1051,7 +1051,7 @@ int UtcDaliTextMultiLanguageSetScripts(void)
       3u,
       3u,
     },
-    TextAbstraction::LATIN
+    TextAbstraction::UNKNOWN
   };
   ScriptRun scriptRun1202 =
   {
@@ -1059,7 +1059,7 @@ int UtcDaliTextMultiLanguageSetScripts(void)
       6u,
       3u,
     },
-    TextAbstraction::LATIN
+    TextAbstraction::UNKNOWN
   };
   ScriptRun scriptRun1203 =
   {
@@ -1067,7 +1067,7 @@ int UtcDaliTextMultiLanguageSetScripts(void)
       9u,
       2u,
     },
-    TextAbstraction::LATIN
+    TextAbstraction::UNKNOWN
   };
   scriptRuns12.PushBack( scriptRun1200 );
   scriptRuns12.PushBack( scriptRun1201 );
@@ -1081,7 +1081,7 @@ int UtcDaliTextMultiLanguageSetScripts(void)
       0u,
       4u,
     },
-    TextAbstraction::LATIN // An unknown script is transformed to LATIN
+    TextAbstraction::UNKNOWN
   };
   scriptRuns13.PushBack( scriptRun1301 );
 
index 13595ab..49d36e0 100644 (file)
@@ -583,13 +583,13 @@ int UtcDaliTextViewModelElideText02(void)
   Size textSize00( 100.f, 100.f );
 
   Size textSize01( 80.f, 100.f );
-  float positions01[] = { 0.f, 10.f, 16.f, 26.f, 35.f, 38.f, 46.f, 56.f };
+  float positions01[] = { 0.f, 9.f, 17.f, 27.f, 35.f, 37.f, 46.f, 56.f };
 
   Size textSize02( 80.f, 100.f );
   float positions02[] = { 72.f, 63.f, 54.f, 50.f, 43.f, 38.f, 30.f, 11.f };
 
   Size textSize03( 80.f, 100.f );
-  float positions03[] = { 77.f, 76.f, 71.f, 62.f, 60.f, 52.f, 47.f, 42.f, 39.f, 35.f, 32.f, 13.f };
+  float positions03[] = { 77.f, 76.f, 71.f, 62.f, 59.f, 52.f, 47.f, 42.f, 39.f, 35.f, 32.f, 13.f };
 
   Size textSize04( 80.f, 10.f );
   float positions04[] = { 2.f };
index ebada51..af5f1a6 100644 (file)
@@ -66,7 +66,7 @@ int UtcTextureManagerRequestLoad(void)
     TextureManager::ReloadPolicy::CACHED,
     preMultiply);
 
-  const VisualUrl& url = textureManager.GetVisualUrl( textureId );
+  VisualUrl url = textureManager.GetVisualUrl( textureId );
 
   DALI_TEST_EQUALS( url.GetUrl().compare( filename ), 0, TEST_LOCATION );
 
index bbe1aa6..5a215dd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -23,6 +23,8 @@
 #include <dali-toolkit/dali-toolkit.h>
 #include <toolkit-text-utils.h>
 #include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
+#include <dali-toolkit/internal/visuals/visual-factory-cache.h>
+#include <dali-toolkit/internal/visuals/color/color-visual.h>
 #include <dummy-visual.h>
 #include <../dali-toolkit/dali-toolkit-test-utils/dummy-control.h>
 
@@ -105,3 +107,46 @@ int UtcDaliVisualActionNotImplemented(void)
 
   END_TEST;
 }
+
+int UtcDaliVisualSetProperties(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline( "Register a visual and SetProperties" );
+
+  Toolkit::Internal::VisualFactoryCache* factoryCache = new Toolkit::Internal::VisualFactoryCache(false);
+
+  //Created ColorVisual
+  Property::Map propertyMap1;
+  propertyMap1.Insert(Visual::Property::TYPE,  Visual::COLOR);
+  propertyMap1.Insert(ColorVisual::Property::MIX_COLOR,  Color::RED);
+  Toolkit::Internal::ColorVisualPtr colorVisualPtr = Toolkit::Internal::ColorVisual::New( *factoryCache, propertyMap1 );
+
+  DummyControl dummyControl = DummyControl::New( true );
+  Impl::DummyControl& dummyImpl = static_cast< Impl::DummyControl& >( dummyControl.GetImplementation() );
+
+  Toolkit::Visual::Base visualBaseHandle = Toolkit::Visual::Base( colorVisualPtr.Get() );
+  dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visualBaseHandle );
+  dummyControl.SetSize( 200.f, 200.f );
+  Stage::GetCurrent().Add( dummyControl );
+
+  application.SendNotification();
+  application.Render();
+
+  Property::Map propertyMap;
+  propertyMap.Insert( Visual::Property::MIX_COLOR,  Color::BLUE );
+
+  colorVisualPtr->SetProperties( propertyMap );
+  application.SendNotification();
+  application.Render();
+
+  Property::Map resultMap;
+  visualBaseHandle.CreatePropertyMap( resultMap );
+
+  Property::Value* colorValue = resultMap.Find( Visual::Property::MIX_COLOR,  Property::VECTOR4 );
+  DALI_TEST_CHECK( colorValue );
+  DALI_TEST_CHECK( colorValue->Get< Vector4 >() == Color::BLUE );
+
+  delete factoryCache;
+
+  END_TEST;
+}
index a247f7d..0e640e7 100644 (file)
@@ -183,7 +183,7 @@ void TestApplication::DoUpdate( unsigned int intervalMilliseconds, const char* l
 bool TestApplication::Render( unsigned int intervalMilliseconds, const char* location )
 {
   DoUpdate( intervalMilliseconds, location );
-  mCore->Render( mRenderStatus );
+  mCore->Render( mRenderStatus, false );
 
   mFrame++;
 
@@ -209,7 +209,7 @@ bool TestApplication::GetRenderNeedsUpdate()
 bool TestApplication::RenderOnly( )
 {
   // Update Time values
-  mCore->Render( mRenderStatus );
+  mCore->Render( mRenderStatus, false );
 
   mFrame++;
 
index 4b25c5d..3ff177c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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,8 @@
 #include <dali/public-api/object/base-object.h>
 
 #include <toolkit-adaptor-impl.h>
+#include <dali/integration-api/debug.h>
+#include <test-application.h>
 
 namespace Dali
 {
@@ -210,6 +212,34 @@ void Adaptor::SetStereoBase(  float stereoBase )
 {
 }
 
+
+class LogFactory : public LogFactoryInterface
+{
+public:
+  virtual void InstallLogFunction() const
+  {
+    Dali::Integration::Log::LogFunction logFunction(&TestApplication::LogMessage);
+    Dali::Integration::Log::InstallLogFunction(logFunction);
+  }
+
+  LogFactory()
+  {
+  }
+  virtual ~LogFactory()
+  {
+  }
+};
+
+LogFactory* gLogFactory = NULL;
+const LogFactoryInterface& Adaptor::GetLogFactory()
+{
+  if( gLogFactory == NULL )
+  {
+    gLogFactory = new LogFactory;
+  }
+  return *gLogFactory;
+}
+
 Adaptor::Adaptor()
 : mImpl( NULL )
 {
old mode 100644 (file)
new mode 100755 (executable)
index e7fb2cf..52e2d41
@@ -37,6 +37,8 @@ public:
   {
     mMuted = false;
     mLooping = false;
+    mPlayPosition = 0;
+    mDisplyMode = Dali::VideoPlayerPlugin::DisplayMode::DST_ROI;
   }
 
   void SetMuted( bool muted )
@@ -67,6 +69,27 @@ public:
     }
   }
 
+  int GetPlayPosition()
+  {
+    return mPlayPosition;
+  }
+
+  void SetPlayPosition( int pos )
+  {
+    mPlayPosition = pos;
+  }
+
+  Dali::VideoPlayerPlugin::DisplayMode::Type GetDisplayMode() const
+  {
+    return mDisplyMode;
+  }
+
+  void SetDisplayMode( Dali::VideoPlayerPlugin::DisplayMode::Type mDisplyMode )
+  {
+    mDisplyMode = mDisplyMode;
+  }
+
+
 public:
 
   std::string mUrl;
@@ -78,6 +101,8 @@ private:
 
   bool mMuted;
   bool mLooping;
+  int mPlayPosition;
+  Dali::VideoPlayerPlugin::DisplayMode::Type mDisplyMode;
 };
 
 inline VideoPlayer& GetImplementation( Dali::VideoPlayer& player )
@@ -201,11 +226,12 @@ void VideoPlayer::SetRenderingTarget( Any target )
 
 void VideoPlayer::SetPlayPosition( int millisecond )
 {
+  Internal::Adaptor::GetImplementation( *this ).SetPlayPosition( millisecond );
 }
 
 int VideoPlayer::GetPlayPosition()
 {
-  return 0;
+  return Internal::Adaptor::GetImplementation( *this ).GetPlayPosition();
 }
 
 void VideoPlayer::SetDisplayArea( DisplayArea area )
@@ -234,10 +260,29 @@ void VideoPlayer::Backward( int millisecond )
 {
 }
 
-bool VideoPlayer::IsVideoTextureSupported() const
+bool VideoPlayer::IsVideoTextureSupported()
 {
   return ToolkitApplication::DECODED_IMAGES_SUPPORTED;
 }
 
+void VideoPlayer::SetCodecType( Dali::VideoPlayerPlugin::CodecType type )
+{
+}
+
+Dali::VideoPlayerPlugin::CodecType VideoPlayer::GetCodecType() const
+{
+  return Dali::VideoPlayerPlugin::CodecType::DEFAULT;
+}
+
+void VideoPlayer::SetDisplayMode( Dali::VideoPlayerPlugin::DisplayMode::Type mode )
+{
+  Internal::Adaptor::GetImplementation( *this ).SetDisplayMode( mode );
+}
+
+Dali::VideoPlayerPlugin::DisplayMode::Type VideoPlayer::GetDisplayMode() const
+{
+  return Internal::Adaptor::GetImplementation( *this ).GetDisplayMode();
+}
+
 } // namespace Dali;
 
index 4ff9b13..c9cbdc5 100644 (file)
@@ -366,7 +366,7 @@ int UtcDaliImageViewSetGetProperty03(void)
   DALI_TEST_CHECK( srcFactorRgb == BlendFactor::ONE );
   DALI_TEST_CHECK( destFactorRgb == BlendFactor::ONE_MINUS_SRC_ALPHA );
   DALI_TEST_CHECK( srcFactorAlpha == BlendFactor::ONE );
-  DALI_TEST_CHECK( destFactorAlpha == BlendFactor::ONE );
+  DALI_TEST_CHECK( destFactorAlpha == BlendFactor::ONE_MINUS_SRC_ALPHA );
 
   value = renderer.GetProperty( Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA );
   DALI_TEST_CHECK( value.Get( enable ) );
index 1a15ec6..8b17338 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -760,18 +760,17 @@ int UtcDaliImageVisualAnimateMixColor(void)
   application.SendNotification();
   application.Render(0); // Ensure animation starts
   application.Render(2000u); // Halfway point
-  Vector4 testColor(1.0f, 0.0f, 0.5f, 0.75f );
+  Vector3 testColor( 1.0f, 0.0f, 0.5f );
 
-  DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector4>("uColor", Vector4(0.5f, 0.5f, 0.5f, 1.0f )), true, TEST_LOCATION );
-  DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector3>("mixColor", Vector3(testColor)), true, TEST_LOCATION );
-  DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<float>("opacity", testColor.a), true, TEST_LOCATION );
+  // uColor.a should be actor's alpha * mixColor.a.
+  DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector4>( "uColor", Vector4( 0.5f, 0.5f, 0.5f, 0.75f ) ), true, TEST_LOCATION );
+  DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector3>( "mixColor", testColor ), true, TEST_LOCATION );
 
   application.Render(2000u); // Halfway point between blue and white
 
   DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION );
-  DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector4>("uColor", Color::WHITE ), true, TEST_LOCATION );
-  DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector3>("mixColor", Vector3(TARGET_MIX_COLOR)), true, TEST_LOCATION );
-  DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<float>("opacity", TARGET_MIX_COLOR.a), true, TEST_LOCATION );
+  DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector4>( "uColor", Vector4( 1.0f, 1.0f, 1.0f, 0.5f ) ), true, TEST_LOCATION );
+  DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector3>( "mixColor", Vector3( TARGET_MIX_COLOR ) ), true, TEST_LOCATION );
 
   TestMixColor( visual, Visual::Property::MIX_COLOR, TARGET_MIX_COLOR );
 
@@ -808,11 +807,6 @@ int UtcDaliImageVisualAnimateOpacity(void)
   DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION);
 
   Renderer renderer = actor.GetRendererAt(0);
-  tet_infoline("Test that the renderer has the opacity property");
-  Property::Index index = DevelHandle::GetPropertyIndex( renderer, Visual::Property::OPACITY );
-  DALI_TEST_CHECK( index != Property::INVALID_INDEX );
-
-
   Property::Value blendModeValue = renderer.GetProperty( Renderer::Property::BLEND_MODE );
   DALI_TEST_EQUALS( blendModeValue.Get<int>(), (int)BlendMode::ON, TEST_LOCATION );
 
@@ -838,12 +832,15 @@ int UtcDaliImageVisualAnimateOpacity(void)
     application.Render(2000u); // Halfway point through animation
     application.SendNotification(); // Handle any signals
 
-    DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<float>("opacity", 0.75f), true, TEST_LOCATION );
+    Vector4 color;
+    DALI_TEST_CHECK( application.GetGlAbstraction().GetUniformValue< Vector4 >( "uColor", color ) );
+    DALI_TEST_EQUALS( color.a, 0.75f, TEST_LOCATION );
 
     application.Render(2001u); // end
     application.SendNotification(); // ensure animation finished signal is sent
 
-    DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<float>("opacity", 1.0f), true, TEST_LOCATION );
+    DALI_TEST_CHECK( application.GetGlAbstraction().GetUniformValue< Vector4 >( "uColor", color ) );
+    DALI_TEST_EQUALS( color.a, 1.0f, TEST_LOCATION );
 
     blendModeValue = renderer.GetProperty( Renderer::Property::BLEND_MODE );
     DALI_TEST_EQUALS( blendModeValue.Get<int>(), (int)BlendMode::AUTO, TEST_LOCATION );
@@ -875,12 +872,15 @@ int UtcDaliImageVisualAnimateOpacity(void)
     application.Render(2000u); // Halfway point
     application.SendNotification();
 
-    DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<float>("opacity", 0.55f), true, TEST_LOCATION );
+    Vector4 color;
+    DALI_TEST_CHECK( application.GetGlAbstraction().GetUniformValue< Vector4 >( "uColor", color ) );
+    DALI_TEST_EQUALS( color.a, 0.55f, TEST_LOCATION );
 
     application.Render(2016u); // end
     application.SendNotification();
 
-    DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<float>("opacity", 0.1f), true, TEST_LOCATION );
+    DALI_TEST_CHECK( application.GetGlAbstraction().GetUniformValue< Vector4 >( "uColor", color ) );
+    DALI_TEST_EQUALS( color.a, 0.1f, TEST_LOCATION );
 
     blendModeValue = renderer.GetProperty( Renderer::Property::BLEND_MODE );
     DALI_TEST_EQUALS( blendModeValue.Get<int>(), (int)BlendMode::ON, TEST_LOCATION );
index 825e7d4..e0daf86 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -65,6 +65,7 @@ const char* const PROPERTY_NAME_UNDERLINE = "underline";
 const char* const PROPERTY_NAME_SHADOW = "shadow";
 const char* const PROPERTY_NAME_EMBOSS = "emboss";
 const char* const PROPERTY_NAME_OUTLINE = "outline";
+const char* const PROPERTY_NAME_BACKGROUND = "textBackground";
 
 const char* const PROPERTY_NAME_PIXEL_SIZE = "pixelSize";
 const char* const PROPERTY_NAME_ELLIPSIS = "ellipsis";
@@ -255,6 +256,7 @@ int UtcDaliToolkitTextLabelGetPropertyP(void)
   DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_SHADOW ) == TextLabel::Property::SHADOW );
   DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_EMBOSS ) == TextLabel::Property::EMBOSS );
   DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_OUTLINE ) == TextLabel::Property::OUTLINE );
+  DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_BACKGROUND ) == DevelTextLabel::Property::BACKGROUND );
   DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_PIXEL_SIZE ) == TextLabel::Property::PIXEL_SIZE );
   DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_ELLIPSIS ) == TextLabel::Property::ELLIPSIS );
   DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_AUTO_SCROLL_LOOP_DELAY ) == TextLabel::Property::AUTO_SCROLL_LOOP_DELAY );
@@ -534,6 +536,18 @@ int UtcDaliToolkitTextLabelSetPropertyP(void)
   DALI_TEST_EQUALS( outlineMapGet.Count(), outlineMapSet.Count(), TEST_LOCATION );
   DALI_TEST_EQUALS( DaliTestCheckMaps( outlineMapGet, outlineMapSet ), true, TEST_LOCATION );
 
+  // Check the background property
+  Property::Map backgroundMapSet;
+  Property::Map backgroundMapGet;
+
+  backgroundMapSet["enable"] = true;
+  backgroundMapSet["color"] = Color::RED;
+  label.SetProperty( DevelTextLabel::Property::BACKGROUND, backgroundMapSet );
+
+  backgroundMapGet = label.GetProperty<Property::Map>( DevelTextLabel::Property::BACKGROUND );
+  DALI_TEST_EQUALS( backgroundMapGet.Count(), backgroundMapSet.Count(), TEST_LOCATION );
+  DALI_TEST_EQUALS( DaliTestCheckMaps( backgroundMapGet, backgroundMapSet ), true, TEST_LOCATION );
+
   // Check the pixel size of font
   label.SetProperty( TextLabel::Property::PIXEL_SIZE, 20.f );
   DALI_TEST_EQUALS( label.GetProperty<float>( TextLabel::Property::PIXEL_SIZE ), 20.f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
index 42ca88e..3850d2a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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,6 +19,7 @@
 #include <dali-toolkit-test-suite-utils.h>
 #include <dali.h>
 #include <dali/devel-api/object/handle-devel.h>
+#include <dali/devel-api/rendering/renderer-devel.h>
 #include <dali-toolkit/dali-toolkit.h>
 #include <dali-toolkit/devel-api/visual-factory/transition-data.h>
 #include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
@@ -254,14 +255,13 @@ int UtcDaliTransitionDataMap1P(void)
 
   Renderer renderer = actor.GetRendererAt(0);
   Property::Index mixColorIndex = DevelHandle::GetPropertyIndex( renderer, ColorVisual::Property::MIX_COLOR );
-  Property::Index opacityIndex = DevelHandle::GetPropertyIndex( renderer, Visual::Property::OPACITY );
   application.SendNotification();
   application.Render(0);
 
   DALI_TEST_EQUALS( renderer.GetProperty<Vector3>(mixColorIndex), Vector3(Color::MAGENTA), TEST_LOCATION);
   DALI_TEST_EQUALS( renderer.GetCurrentProperty< Vector3 >( mixColorIndex ), Vector3(Color::MAGENTA), TEST_LOCATION );
-  DALI_TEST_EQUALS( renderer.GetProperty<float>(opacityIndex), 1.0f, 0.001f, TEST_LOCATION );
-  DALI_TEST_EQUALS( renderer.GetCurrentProperty< float >( opacityIndex ), 1.0f, 0.001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( renderer.GetProperty<float>( DevelRenderer::Property::OPACITY ), 1.0f, 0.001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( renderer.GetCurrentProperty< float >( DevelRenderer::Property::OPACITY ), 1.0f, 0.001f, TEST_LOCATION );
 
   anim.Play();
 
@@ -270,12 +270,12 @@ int UtcDaliTransitionDataMap1P(void)
   application.Render(500); // Halfway thru anim
   application.SendNotification();
   DALI_TEST_EQUALS( renderer.GetCurrentProperty< Vector3 >( mixColorIndex ), Vector3(Color::MAGENTA+Color::RED)*0.5f, TEST_LOCATION);
-  DALI_TEST_EQUALS( renderer.GetCurrentProperty< float >( opacityIndex ), 1.0f, 0.001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( renderer.GetCurrentProperty< float >( DevelRenderer::Property::OPACITY ), 1.0f, 0.001f, TEST_LOCATION );
 
   application.Render(500); // End of anim
   application.SendNotification();
   DALI_TEST_EQUALS( renderer.GetCurrentProperty< Vector3 >( mixColorIndex ), Vector3(Color::RED), TEST_LOCATION );
-  DALI_TEST_EQUALS( renderer.GetCurrentProperty< float >( opacityIndex ), 1.0f, 0.001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( renderer.GetCurrentProperty< float >( DevelRenderer::Property::OPACITY ), 1.0f, 0.001f, TEST_LOCATION );
 
   END_TEST;
 }
@@ -323,14 +323,13 @@ int UtcDaliTransitionDataMap2P(void)
 
   Renderer renderer = actor.GetRendererAt(0);
   Property::Index mixColorIndex = DevelHandle::GetPropertyIndex( renderer, ColorVisual::Property::MIX_COLOR );
-  Property::Index opacityIndex = DevelHandle::GetPropertyIndex( renderer, Visual::Property::OPACITY );
   application.SendNotification();
   application.Render(0);
 
   DALI_TEST_EQUALS( renderer.GetProperty<Vector3>(mixColorIndex), Vector3(Color::MAGENTA), TEST_LOCATION);
   DALI_TEST_EQUALS( renderer.GetCurrentProperty< Vector3 >( mixColorIndex ), Vector3(Color::MAGENTA), TEST_LOCATION );
-  DALI_TEST_EQUALS( renderer.GetProperty<float>(opacityIndex), 1.0f, 0.001f, TEST_LOCATION );
-  DALI_TEST_EQUALS( renderer.GetCurrentProperty< float >( opacityIndex ), 1.0f, 0.001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( renderer.GetProperty<float>( DevelRenderer::Property::OPACITY ), 1.0f, 0.001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( renderer.GetCurrentProperty< float >( DevelRenderer::Property::OPACITY ), 1.0f, 0.001f, TEST_LOCATION );
 
   anim.Play();
 
@@ -340,12 +339,12 @@ int UtcDaliTransitionDataMap2P(void)
   application.Render(500); // Halfway thru anim
   application.SendNotification();
   DALI_TEST_EQUALS( renderer.GetCurrentProperty< Vector3 >( mixColorIndex ), Vector3(Color::MAGENTA+Color::RED)*0.5f, TEST_LOCATION);
-  DALI_TEST_EQUALS( renderer.GetCurrentProperty< float >( opacityIndex ), 1.0f, 0.001f, TEST_LOCATION);
+  DALI_TEST_EQUALS( renderer.GetCurrentProperty< float >( DevelRenderer::Property::OPACITY ), 1.0f, 0.001f, TEST_LOCATION);
 
   application.Render(500); // End of anim
   application.SendNotification();
   DALI_TEST_EQUALS( renderer.GetCurrentProperty< Vector3 >( mixColorIndex ), Vector3(Color::RED), TEST_LOCATION );
-  DALI_TEST_EQUALS( renderer.GetCurrentProperty< float >( opacityIndex ), 1.0f, 0.001f, TEST_LOCATION);
+  DALI_TEST_EQUALS( renderer.GetCurrentProperty< float >( DevelRenderer::Property::OPACITY ), 1.0f, 0.001f, TEST_LOCATION);
 
   END_TEST;
 }
@@ -396,14 +395,13 @@ int UtcDaliTransitionDataMap2Pb(void)
 
   Renderer renderer = actor.GetRendererAt(0);
   Property::Index mixColorIndex = DevelHandle::GetPropertyIndex( renderer, PrimitiveVisual::Property::MIX_COLOR );
-  Property::Index opacityIndex = DevelHandle::GetPropertyIndex( renderer, Visual::Property::OPACITY );
   application.SendNotification();
   application.Render(0);
 
   DALI_TEST_EQUALS( renderer.GetProperty<Vector3>(mixColorIndex), Vector3(Color::MAGENTA), TEST_LOCATION);
   DALI_TEST_EQUALS( renderer.GetCurrentProperty< Vector3 >( mixColorIndex ), Vector3(Color::MAGENTA), TEST_LOCATION );
-  DALI_TEST_EQUALS( renderer.GetProperty<float>(opacityIndex), 1.0f, 0.001f, TEST_LOCATION );
-  DALI_TEST_EQUALS( renderer.GetCurrentProperty< float >( opacityIndex ), 1.0f, 0.001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( renderer.GetProperty<float>( DevelRenderer::Property::OPACITY ), 1.0f, 0.001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( renderer.GetCurrentProperty< float >( DevelRenderer::Property::OPACITY ), 1.0f, 0.001f, TEST_LOCATION );
 
   anim.Play();
 
@@ -413,12 +411,12 @@ int UtcDaliTransitionDataMap2Pb(void)
   application.Render(500); // Halfway thru anim
   application.SendNotification();
   DALI_TEST_EQUALS( renderer.GetCurrentProperty< Vector3 >( mixColorIndex ), Vector3(Color::MAGENTA+Color::RED)*0.5f, TEST_LOCATION);
-  DALI_TEST_EQUALS( renderer.GetCurrentProperty< float >( opacityIndex ), 1.0f, 0.001f, TEST_LOCATION);
+  DALI_TEST_EQUALS( renderer.GetCurrentProperty< float >( DevelRenderer::Property::OPACITY ), 1.0f, 0.001f, TEST_LOCATION);
 
   application.Render(500); // End of anim
   application.SendNotification();
   DALI_TEST_EQUALS( renderer.GetCurrentProperty< Vector3 >( mixColorIndex ), Vector3(Color::RED), TEST_LOCATION );
-  DALI_TEST_EQUALS( renderer.GetCurrentProperty< float >( opacityIndex ), 1.0f, 0.001f, TEST_LOCATION);
+  DALI_TEST_EQUALS( renderer.GetCurrentProperty< float >( DevelRenderer::Property::OPACITY ), 1.0f, 0.001f, TEST_LOCATION);
 
   END_TEST;
 }
@@ -593,16 +591,15 @@ int UtcDaliTransitionDataMap5P(void)
 
   Renderer renderer = actor.GetRendererAt(0);
   Property::Index mixColorIndex = DevelHandle::GetPropertyIndex( renderer, ColorVisual::Property::MIX_COLOR );
-  Property::Index opacityIndex = DevelHandle::GetPropertyIndex( renderer, Visual::Property::OPACITY );
   application.SendNotification();
   application.Render(0);
 
   DALI_TEST_EQUALS( renderer.GetProperty<Vector3>(mixColorIndex), Vector3(Color::MAGENTA), TEST_LOCATION);
-  DALI_TEST_EQUALS( renderer.GetProperty<float>(opacityIndex), 0.0f, 0.001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( renderer.GetProperty<float>( DevelRenderer::Property::OPACITY ), 0.0f, 0.001f, TEST_LOCATION );
   DALI_TEST_EQUALS( renderer.GetProperty<int>(Renderer::Property::BLEND_MODE), (int)BlendMode::ON, TEST_LOCATION );
 
   DALI_TEST_EQUALS( renderer.GetCurrentProperty< Vector3 >( mixColorIndex ), Vector3(Color::MAGENTA), TEST_LOCATION);
-  DALI_TEST_EQUALS( renderer.GetCurrentProperty< float >( opacityIndex ), 0.0f, 0.001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( renderer.GetCurrentProperty< float >( DevelRenderer::Property::OPACITY ), 0.0f, 0.001f, TEST_LOCATION );
   DALI_TEST_EQUALS( renderer.GetCurrentProperty< int >( Renderer::Property::BLEND_MODE ), (int)BlendMode::ON, TEST_LOCATION );
 
   anim.Play();
@@ -612,13 +609,14 @@ int UtcDaliTransitionDataMap5P(void)
   application.Render(500); // Halfway thru anim
   application.SendNotification();
   DALI_TEST_EQUALS( renderer.GetCurrentProperty< Vector3 >( mixColorIndex ), Vector3(Color::MAGENTA), TEST_LOCATION);
-  DALI_TEST_EQUALS( renderer.GetCurrentProperty< float >( opacityIndex ), 0.5f, 0.001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( renderer.GetCurrentProperty< float >( DevelRenderer::Property::OPACITY ), 0.5f, 0.001f, TEST_LOCATION );
   DALI_TEST_EQUALS( renderer.GetCurrentProperty< int >( Renderer::Property::BLEND_MODE ), (int)BlendMode::ON, TEST_LOCATION );
 
   application.Render(501); // End of anim
   application.SendNotification();
+  application.Render();
   DALI_TEST_EQUALS( renderer.GetCurrentProperty< Vector3 >( mixColorIndex ), Vector3(Color::MAGENTA), TEST_LOCATION );
-  DALI_TEST_EQUALS( renderer.GetCurrentProperty< float >( opacityIndex ), 1.0f, 0.001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( renderer.GetCurrentProperty< float >( DevelRenderer::Property::OPACITY ), 1.0f, 0.001f, TEST_LOCATION );
   DALI_TEST_EQUALS( renderer.GetCurrentProperty< int >( Renderer::Property::BLEND_MODE ), (int)BlendMode::AUTO, TEST_LOCATION );
 
   END_TEST;
@@ -665,14 +663,13 @@ int UtcDaliTransitionDataMap6P(void)
 
   Renderer renderer = actor.GetRendererAt(0);
   Property::Index mixColorIndex = DevelHandle::GetPropertyIndex( renderer, ColorVisual::Property::MIX_COLOR );
-  Property::Index opacityIndex = DevelHandle::GetPropertyIndex( renderer, Visual::Property::OPACITY );
   application.SendNotification();
   application.Render(0);
 
   DALI_TEST_EQUALS( renderer.GetProperty<Vector3>(mixColorIndex), Vector3(Color::MAGENTA), TEST_LOCATION);
   DALI_TEST_EQUALS( renderer.GetCurrentProperty< Vector3 >( mixColorIndex ), Vector3(Color::MAGENTA), TEST_LOCATION);
-  DALI_TEST_EQUALS( renderer.GetProperty<float>(opacityIndex), 1.0f, 0.001f, TEST_LOCATION );
-  DALI_TEST_EQUALS( renderer.GetCurrentProperty< float >( opacityIndex ), 1.0f, 0.001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( renderer.GetProperty<float>( DevelRenderer::Property::OPACITY ), 1.0f, 0.001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( renderer.GetCurrentProperty< float >( DevelRenderer::Property::OPACITY ), 1.0f, 0.001f, TEST_LOCATION );
 
   // Note, This should be testing for AUTO
   // this is the same problem as C# target value being set before Play is called.
@@ -687,13 +684,13 @@ int UtcDaliTransitionDataMap6P(void)
   application.Render(500); // Halfway thru anim
   application.SendNotification();
   DALI_TEST_EQUALS( renderer.GetCurrentProperty< Vector3 >( mixColorIndex ), Vector3(Color::MAGENTA), TEST_LOCATION);
-  DALI_TEST_EQUALS( renderer.GetCurrentProperty< float >( opacityIndex ), 0.5f, 0.001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( renderer.GetCurrentProperty< float >( DevelRenderer::Property::OPACITY ), 0.5f, 0.001f, TEST_LOCATION );
   DALI_TEST_EQUALS( renderer.GetCurrentProperty< int >( Renderer::Property::BLEND_MODE ), (int)BlendMode::ON, TEST_LOCATION );
 
   application.Render(500); // End of anim
   application.SendNotification();
   DALI_TEST_EQUALS( renderer.GetCurrentProperty< Vector3 >( mixColorIndex ), Vector3(Color::MAGENTA), TEST_LOCATION );
-  DALI_TEST_EQUALS( renderer.GetCurrentProperty< float >( opacityIndex ), 0.0f, 0.001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( renderer.GetCurrentProperty< float >( DevelRenderer::Property::OPACITY ), 0.0f, 0.001f, TEST_LOCATION );
   DALI_TEST_EQUALS( renderer.GetCurrentProperty< int >( Renderer::Property::BLEND_MODE ), (int)BlendMode::ON, TEST_LOCATION );
 
   END_TEST;
@@ -818,11 +815,10 @@ int UtcDaliTransitionDataMapN4(void)
 
   Renderer renderer = actor.GetRendererAt(0);
   Property::Index mixColorIdx = DevelHandle::GetPropertyIndex( renderer, ColorVisual::Property::MIX_COLOR );
-  Property::Index opacityIdx = DevelHandle::GetPropertyIndex( renderer, Visual::Property::OPACITY );
 
   tet_printf( "Test that the property has been set to target value\n");
   DALI_TEST_EQUALS(renderer.GetProperty<Vector3>(mixColorIdx), Vector3(Color::RED), 0.001, TEST_LOCATION);
-  DALI_TEST_EQUALS(renderer.GetProperty<float>(opacityIdx), 1.0f, 0.001, TEST_LOCATION);
+  DALI_TEST_EQUALS(renderer.GetProperty<float>( DevelRenderer::Property::OPACITY ), 1.0f, 0.001, TEST_LOCATION);
 
   END_TEST;
 }
@@ -922,11 +918,10 @@ int UtcDaliTransitionDataMapN6(void)
 
   Renderer renderer = actor.GetRendererAt(0);
   Property::Index mixColorIdx = DevelHandle::GetPropertyIndex( renderer, ColorVisual::Property::MIX_COLOR );
-  Property::Index opacityIdx = DevelHandle::GetPropertyIndex( renderer, Visual::Property::OPACITY );
 
   tet_printf( "Test that the property has been set to target value\n");
   DALI_TEST_EQUALS(renderer.GetProperty<Vector3>(mixColorIdx), Vector3(Color::RED), 0.001, TEST_LOCATION);
-  DALI_TEST_EQUALS(renderer.GetProperty<float>(opacityIdx), 1.0f, 0.001, TEST_LOCATION);
+  DALI_TEST_EQUALS(renderer.GetProperty<float>( DevelRenderer::Property::OPACITY ), 1.0f, 0.001, TEST_LOCATION);
 
   END_TEST;
 }
old mode 100644 (file)
new mode 100755 (executable)
index 8baed37..d1d35b1
@@ -409,6 +409,7 @@ int UtcDaliVideoViewMethodsForCoverage2(void)
 int UtcDaliVideoViewPropertyUnderlay(void)
 {
   ToolkitTestApplication application;
+  tet_infoline("UtcDaliVideoViewPropertyUnderlay");
   ToolkitApplication::DECODED_IMAGES_SUPPORTED = true;
 
   VideoView view = VideoView::New();
@@ -453,3 +454,77 @@ int UtcDaliVideoViewPropertyUnderlay(void)
 
   END_TEST;
 }
+
+int UtcDaliVideoViewPropertyPlayPosition(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline("UtcDaliVideoViewPropertyPlayPosition");
+
+  VideoView view = VideoView::New();
+  DALI_TEST_CHECK( view );
+
+  Stage::GetCurrent().Add( view );
+  view.Play();
+
+  application.SendNotification();
+  application.Render();
+
+  int playPos = view.GetProperty( Toolkit::VideoView::Property::PLAY_POSITION ).Get< int >();
+  DALI_TEST_CHECK( playPos == 0 );
+
+  view.SetProperty( Toolkit::VideoView::Property::PLAY_POSITION, 10 );
+  playPos = view.GetProperty( Toolkit::VideoView::Property::PLAY_POSITION ).Get< int >();
+  // Actually setting play position will be async
+  // Actual platform result may be different.
+  DALI_TEST_CHECK( playPos == 10 );
+
+  END_TEST;
+}
+
+// For coverage.
+int UtcDaliVideoViewNew2(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline("UtcDaliVideoViewNew2");
+
+  VideoView view = VideoView::New( true );
+  DALI_TEST_CHECK( view );
+
+  Stage::GetCurrent().Add( view );
+  view.Play();
+
+  application.SendNotification();
+  application.Render();
+
+  VideoView view2 = VideoView::New( "", false );
+  DALI_TEST_CHECK( view2 );
+
+  Stage::GetCurrent().Add( view2 );
+  view2.Play();
+
+  application.SendNotification();
+  application.Render();
+
+  END_TEST;
+}
+
+int UtcDaliVideoViewPropertyDisplayMode(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline("UtcDaliVideoViewPropertyDisplayMode");
+
+  VideoView view = VideoView::New();
+  DALI_TEST_CHECK( view );
+
+  Stage::GetCurrent().Add( view );
+  view.Play();
+
+  application.SendNotification();
+  application.Render();
+
+  view.SetProperty( Toolkit::VideoView::Property::DISPLAY_MODE, Toolkit::VideoView::DisplayMode::DST_ROI );
+  int displayMode = view.GetProperty( Toolkit::VideoView::Property::DISPLAY_MODE ).Get< int >();
+  DALI_TEST_CHECK( displayMode == Toolkit::VideoView::DisplayMode::DST_ROI );
+
+  END_TEST;
+}
index bf54997..9c817b6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -1128,6 +1128,9 @@ int UtcDaliVisualGetPropertyMap10(void)
   Property::Map outlineMapSet;
   propertyMap.Insert( "outline", outlineMapSet.Add("color", Color::YELLOW).Add("width", 1) );
 
+  Property::Map backgroundMapSet;
+  propertyMap.Insert( "textBackground", backgroundMapSet.Add("enable", true).Add("color", Color::CYAN) );
+
   Visual::Base textVisual = factory.CreateVisual( propertyMap );
 
   Property::Map resultMap;
@@ -1202,6 +1205,13 @@ int UtcDaliVisualGetPropertyMap10(void)
   DALI_TEST_EQUALS( outlineMapGet.Count(), outlineMapSet.Count(), TEST_LOCATION );
   DALI_TEST_EQUALS( DaliTestCheckMaps( outlineMapGet, outlineMapSet ), true, TEST_LOCATION );
 
+  value = resultMap.Find( DevelTextVisual::Property::BACKGROUND, Property::MAP );
+  DALI_TEST_CHECK( value );
+
+  Property::Map backgroundMapGet = value->Get<Property::Map>();
+  DALI_TEST_EQUALS( backgroundMapGet.Count(), backgroundMapSet.Count(), TEST_LOCATION );
+  DALI_TEST_EQUALS( DaliTestCheckMaps( backgroundMapGet, backgroundMapSet ), true, TEST_LOCATION );
+
   END_TEST;
 }
 
@@ -1705,7 +1715,7 @@ int UtcDaliVisualAnimateBorderVisual01(void)
   Property::Map map;
   map["target"] = "testVisual";
   map["property"] = "mixColor";
-  map["targetValue"] = Vector4(1,1,1,0);
+  map["targetValue"] = Vector4(1,1,1,0.1);
   map["animator"] = Property::Map()
     .Add("alphaFunction", "LINEAR")
     .Add("timePeriod", Property::Map()
@@ -1744,10 +1754,13 @@ int UtcDaliVisualAnimateBorderVisual01(void)
   DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector4>("borderColor", testColor ), true, TEST_LOCATION );
 
   color = renderer.GetCurrentProperty< Vector3 >( mixColorIndex );
-  testColor = Vector4( 1,1,1,0.4f );
+  testColor = Vector4( 1,1,1,0.45f );
   DALI_TEST_EQUALS( Vector3(color), Vector3(testColor), 0.0001f, TEST_LOCATION );
   DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector3>("mixColor", Vector3(testColor) ), true, TEST_LOCATION );
-  DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<float>("opacity", testColor.a ) , true, TEST_LOCATION );
+
+  Vector4 uColor;
+  DALI_TEST_CHECK( application.GetGlAbstraction().GetUniformValue< Vector4 >( "uColor", uColor ) );
+  DALI_TEST_EQUALS( uColor.a, testColor.a, TEST_LOCATION );
 
   application.Render(2000u);
 
@@ -1755,11 +1768,13 @@ int UtcDaliVisualAnimateBorderVisual01(void)
   DALI_TEST_EQUALS( color, Color::WHITE, TEST_LOCATION );
   DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector4>("borderColor", Color::WHITE ), true, TEST_LOCATION );
 
-  color = renderer.GetCurrentProperty< Vector4 >( mixColorIndex );
-  testColor = Vector4(1,1,1,0);
-  DALI_TEST_EQUALS( color, testColor, TEST_LOCATION );
+  color = renderer.GetCurrentProperty< Vector3 >( mixColorIndex );
+  testColor = Vector4(1,1,1,0.1);
+  DALI_TEST_EQUALS( Vector3(color), Vector3(testColor), TEST_LOCATION );
   DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector3>("mixColor", Vector3(testColor) ), true, TEST_LOCATION );
-  DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<float>("opacity", testColor.a ), true, TEST_LOCATION );
+
+  DALI_TEST_CHECK( application.GetGlAbstraction().GetUniformValue< Vector4 >( "uColor", uColor ) );
+  DALI_TEST_EQUALS( uColor.a, testColor.a, TEST_LOCATION );
 
   END_TEST;
 }
@@ -1920,19 +1935,16 @@ int UtcDaliVisualAnimatePrimitiveVisual(void)
     application.Render(2000u); // halfway point
     application.SendNotification();
 
-    DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector4>("uColor", Vector4(0.5f, 0.5f, 0.5f, 1.0f )), true, TEST_LOCATION );
-
     Vector4 halfwayColor = (INITIAL_MIX_COLOR + TARGET_MIX_COLOR)*0.5;
+    DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector4>("uColor", Vector4(0.5f, 0.5f, 0.5f, halfwayColor.a )), true, TEST_LOCATION );
     DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector3>("mixColor", Vector3(halfwayColor) ), true, TEST_LOCATION );
-    DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<float>("opacity", halfwayColor.a ), true, TEST_LOCATION );
 
     application.Render(2001u); // go past end
     application.SendNotification(); // Trigger signals
 
     DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION );
-    DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector4>("uColor", Color::WHITE ), true, TEST_LOCATION );
+    DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector4>("uColor", Vector4( 1.0f, 1.0f, 1.0f, TARGET_MIX_COLOR.a ) ), true, TEST_LOCATION );
     DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector3>("mixColor", Vector3(TARGET_MIX_COLOR) ), true, TEST_LOCATION );
-    DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<float>("opacity", TARGET_MIX_COLOR.a ), true, TEST_LOCATION );
 
     blendModeValue = renderer.GetProperty( Renderer::Property::BLEND_MODE );
     DALI_TEST_EQUALS( blendModeValue.Get<int>(), (int)BlendMode::AUTO, TEST_LOCATION );
index 9556968..99479c3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -316,12 +316,12 @@ int UtcDaliVisualFactoryGetColorVisual1(void)
   TestVisualRender( application, actor, visual );
 
   Vector3 actualValue(Vector4::ZERO);
-  float opacity=0.0f;
+  Vector4 actualColor(Vector4::ZERO);
   TestGlAbstraction& gl = application.GetGlAbstraction();
   DALI_TEST_CHECK( gl.GetUniformValue<Vector3>( "mixColor", actualValue ) );
-  DALI_TEST_CHECK( gl.GetUniformValue<float>( "opacity", opacity ) );
+  DALI_TEST_CHECK( gl.GetUniformValue<Vector4>( "uColor", actualColor ) );
   DALI_TEST_EQUALS( actualValue, Vector3(testColor), TEST_LOCATION );
-  DALI_TEST_EQUALS( opacity, testColor.a, TEST_LOCATION );
+  DALI_TEST_EQUALS( actualColor.a, testColor.a, TEST_LOCATION );
 
   END_TEST;
 }
@@ -345,12 +345,12 @@ int UtcDaliVisualFactoryGetColorVisual2(void)
   TestVisualRender( application, actor, visual );
 
   Vector3 actualValue;
-  float opacity;
+  Vector4 actualColor;
   TestGlAbstraction& gl = application.GetGlAbstraction();
   DALI_TEST_CHECK( gl.GetUniformValue<Vector3>( "mixColor", actualValue ) );
-  DALI_TEST_CHECK( gl.GetUniformValue<float>( "opacity", opacity ) );
+  DALI_TEST_CHECK( gl.GetUniformValue<Vector4>( "uColor", actualColor ) );
   DALI_TEST_EQUALS( actualValue, Vector3(testColor), TEST_LOCATION );
-  DALI_TEST_EQUALS( opacity, testColor.a, TEST_LOCATION );
+  DALI_TEST_EQUALS( actualColor.a, testColor.a, TEST_LOCATION );
 
   Stage::GetCurrent().Remove(actor);
   DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
@@ -1882,6 +1882,30 @@ int UtcDaliVisualFactoryGetPrimitiveVisual17(void)
   END_TEST;
 }
 
+//Test if primitive shape loads a conic section correctly.
+int UtcDaliVisualFactoryGetPrimitiveVisual18(void)
+{
+  //Set up test application first, so everything else can be handled.
+  ToolkitTestApplication application;
+
+  tet_infoline( "UtcDaliVisualFactoryGetPrimitiveVisual18:  Request primitive visual to display a conic section" );
+
+  //Set up visual properties.
+  Property::Map propertyMap;
+  propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE );
+  propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::CONICAL_FRUSTUM );
+  propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
+  propertyMap.Insert( PrimitiveVisual::Property::SLICES, 10 );
+  propertyMap.Insert( PrimitiveVisual::Property::SCALE_TOP_RADIUS, 30.0f );
+  propertyMap.Insert( PrimitiveVisual::Property::SCALE_BOTTOM_RADIUS, 40.0f );
+  propertyMap.Insert( PrimitiveVisual::Property::SCALE_HEIGHT, 50.0f );
+
+  //Test to see if shape loads correctly.
+  TestPrimitiveVisualWithProperties( propertyMap, application );
+
+  END_TEST;
+}
+
 //Test if primitive shape visual handles the case of not being passed a specific shape to use.
 int UtcDaliVisualFactoryGetPrimitiveVisualN1(void)
 {
old mode 100644 (file)
new mode 100755 (executable)
index 354478a..941fdbc
@@ -345,6 +345,7 @@ ALIASES += clip{3}="\dontinclude \1 \n \skip \2 \n \until \3"
 ALIASES += SINCE_1_0="@since 1.0"
 ALIASES += SINCE_1_1="@since 1.1"
 ALIASES += SINCE_1_2="@since 1.2"
+ALIASES += SINCE_1_3="@since 1.3"
 
 # Extra tags for Tizen 3.0
 ALIASES += SINCE_1_2_2="@since 1.2.2"
@@ -357,12 +358,15 @@ ALIASES += SINCE_1_2_32="@since 1.2.32"
 # Extra tags for Tizen 4.0
 ALIASES += SINCE_1_3_4="@since 1.3.4"
 ALIASES += SINCE_1_3_5="@since 1.3.5"
+ALIASES += SINCE_1_3_9="@since 1.3.9"
+ALIASES += SINCE_1_3_15="@since 1.3.15"
 
 ALIASES += DEPRECATED_1_0="@deprecated Deprecated since 1.0"
 ALIASES += DEPRECATED_1_1="@deprecated Deprecated since 1.1"
 ALIASES += DEPRECATED_1_2_8="@deprecated Deprecated since 1.2.8"
 ALIASES += DEPRECATED_1_2_10="@deprecated Deprecated since 1.2.10"
 ALIASES += DEPRECATED_1_2="@deprecated Deprecated since 1.2"
+ALIASES += DEPRECATED_1_3="@deprecated Deprecated since 1.3"
 
 ALIASES += PLATFORM=""
 ALIASES += PRIVLEVEL_PLATFORM=""
@@ -379,6 +383,7 @@ ALIASES += REMARK_RAWVIDEO=""
 #ALIASES += SINCE_1_0="\par Since:\n 2.4, DALi version 1.0"
 #ALIASES += SINCE_1_1="\par Since:\n 3.0, DALi version 1.1"
 #ALIASES += SINCE_1_2="\par Since:\n 4.0, DALi version 1.2"
+#ALIASES += SINCE_1_3="\par Since:\n 5.0, DALi version 1.3"
 
 ## Extra tags for Tizen 3.0
 #ALIASES += SINCE_1_2_2="\par Since:\n 3.0, DALi version 1.2.2"
@@ -391,6 +396,8 @@ ALIASES += REMARK_RAWVIDEO=""
 ## Extra tags for Tizen 4.0
 #ALIASES += SINCE_1_3_4="\par Since:\n 4.0, DALi version 1.3.4"
 #ALIASES += SINCE_1_3_5="\par Since:\n 4.0, DALi version 1.3.5"
+#ALIASES += SINCE_1_3_9="\par Since:\n 4.0, DALi version 1.3.9"
+#ALIASES += SINCE_1_3_15="\par Since:\n 4.0, DALi version 1.3.15"
 
 ## DALi has no deprecated API in Tizen 2.4 because it's DALi's first release.
 ## Thus deprecated APIs in DALi 1.0.xx will be deprecated in Tizen 3.0.
@@ -399,6 +406,7 @@ ALIASES += REMARK_RAWVIDEO=""
 #ALIASES += DEPRECATED_1_2_8="@deprecated Deprecated since 3.0, DALi version 1.2.8"
 #ALIASES += DEPRECATED_1_2_10="@deprecated Deprecated since 3.0, DALi version 1.2.10"
 #ALIASES += DEPRECATED_1_2="@deprecated Deprecated since 4.0, DALi version 1.2"
+#ALIASES += DEPRECATED_1_3="@deprecated Deprecated since 5.0, DALi version 1.3"
 
 #ALIASES += PLATFORM="@platform"
 #ALIASES += PRIVLEVEL_PLATFORM="\par Privilege Level:\n platform"
index 3238c61..939c08d 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_LABEL_DEVEL_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -80,6 +80,20 @@ namespace Property
      * @see VerticalLineAlignment::Type for supported values
      */
     VERTICAL_LINE_ALIGNMENT,
+
+    /**
+     * @brief The default text background parameters.
+     * @details Name "textBackground", type Property::MAP.
+     * @note Use "textBackground" as property name to avoid conflict with Control's "background" property
+     *
+     * The background map contains the following keys:
+     *
+     * | %Property Name       | Type     | Required | Description                                                                                                        |
+     * |----------------------|----------|----------|--------------------------------------------------------------------------------------------------------------------|
+     * | enable               | BOOLEAN  | No       | True to enable the background or false to disable (the default value is false)                                     |
+     * | color                | VECTOR4  | No       | The color of the background (the default value is Color::CYAN)                                                     |
+     */
+    BACKGROUND,
   };
 
 } // namespace Property
index ec80f49..41f3c89 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_DEVEL_API_VISUALS_TEXT_VISUAL_PROPERTIES_DEVEL_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -54,7 +54,12 @@ enum
    * @brief The default outline parameters.
    * @details name "outline", type Property::MAP.
    */
-  OUTLINE               = UNDERLINE + 1
+  OUTLINE               = UNDERLINE + 1,
+
+  /**
+   * @copydoc Dali::Toolkit::DevelTextLabel::Property::BACKGROUND
+   */
+  BACKGROUND            = UNDERLINE + 2,
 };
 
 
index eb452c0..8880b31 100644 (file)
@@ -108,7 +108,9 @@ bool IsActorFocusableFunction(Actor actor, Dali::HitTestAlgorithm::TraverseType
 
 AccessibilityManager::AccessibilityManager()
 : mCurrentFocusActor(FocusIDPair(0, 0)),
+  mCurrentGesturedActor(),
   mFocusIndicatorActor(),
+  mPreviousPosition( 0.0f, 0.0f ),
   mRecursiveFocusMoveCounter(0),
   mIsWrapped(false),
   mIsFocusWithinGroup(false),
index 23da644..69e924a 100644 (file)
@@ -635,14 +635,14 @@ private:
 
   /**
    * Perform the accessibility action to move the focus to the first item on the top
-   * and read from the top item continously (by three fingers single tap).
+   * and read from the top item continuously (by three fingers single tap).
    * @return whether the accessibility action is performed or not.
    */
   virtual bool AccessibilityActionReadFromTop();
 
   /**
    * Perform the accessibility action to move the focus to and read from the next item
-   * continously (by three fingers double tap).
+   * continuously (by three fingers double tap).
    * @return whether the accessibility action is performed or not.
    */
   virtual bool AccessibilityActionReadFromNext();
index b061268..369c409 100644 (file)
@@ -327,6 +327,9 @@ Control::Impl::Impl( Control& controlImpl )
   mMargin( 0, 0, 0, 0 ),
   mPadding( 0, 0, 0, 0 ),
   mKeyEventSignal(),
+  mKeyInputFocusGainedSignal(),
+  mKeyInputFocusLostSignal(),
+  mResourceReadySignal(),
   mPinchGestureDetector(),
   mPanGestureDetector(),
   mTapGestureDetector(),
index 45cf8b7..cd8438e 100755 (executable)
@@ -194,6 +194,7 @@ ScrollBar::ScrollBar(Toolkit::ScrollBar::Direction direction)
   mIndicatorHideDuration(DEFAULT_INDICATOR_HIDE_DURATION),
   mTransientIndicatorDuration(DEFAULT_INDICATOR_TRANSIENT_DURATION),
   mScrollStart(0.0f),
+  mGestureDisplacement( Vector3::ZERO ),
   mCurrentScrollPosition(0.0f),
   mIndicatorHeightPolicy(Toolkit::ScrollBar::Variable),
   mIndicatorFixedHeight(DEFAULT_INDICATOR_FIXED_HEIGHT),
index 39f9e53..d95d190 100755 (executable)
@@ -316,7 +316,6 @@ private:
 
   Constraint mIndicatorPositionConstraint;
   Constraint mIndicatorSizeConstraint;
-  Constraint mScrollPositionInCurrentAxisConstraint;
 
   bool mIsPanning                 : 1;                               ///< Whether the scroll bar is being panned.
   bool mIndicatorFirstShow        : 1;                               ///< True if the indicator has never been shown
index 31201ee..6cd2e67 100644 (file)
@@ -86,6 +86,9 @@ Scrollable::Scrollable()
   mOvershootAnimationSpeed ( DEFAULT_OVERSHOOT_ANIMATION_SPEED ),
   mOvershootSize( OVERSHOOT_DEFAULT_SIZE ),
   mScrollToAlphaFunction( AlphaFunction::EASE_OUT ),
+  mScrollStartedSignal(),
+  mScrollUpdatedSignal(),
+  mScrollCompletedSignal(),
   mOvershootEnabled(true)
 {
 }
@@ -96,6 +99,9 @@ Scrollable::Scrollable( ControlBehaviour behaviourFlags )
   mOvershootAnimationSpeed ( DEFAULT_OVERSHOOT_ANIMATION_SPEED ),
   mOvershootSize( OVERSHOOT_DEFAULT_SIZE ),
   mScrollToAlphaFunction( AlphaFunction::EASE_OUT ),
+  mScrollStartedSignal(),
+  mScrollUpdatedSignal(),
+  mScrollCompletedSignal(),
   mOvershootEnabled(true)
 {
 }
index 5eece25..c3607f5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -129,7 +129,8 @@ DALI_PROPERTY_REGISTRATION( Toolkit,           TextLabel, "autoScrollStopMode",
 DALI_PROPERTY_REGISTRATION_READ_ONLY( Toolkit, TextLabel, "lineCount",                 INTEGER, LINE_COUNT                 )
 DALI_PROPERTY_REGISTRATION( Toolkit,           TextLabel, "lineWrapMode",              INTEGER, LINE_WRAP_MODE             )
 DALI_DEVEL_PROPERTY_REGISTRATION_READ_ONLY( Toolkit, TextLabel, "textDirection",       INTEGER, TEXT_DIRECTION             )
-DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextLabel, "verticalLineAlignment",         INTEGER, VERTICAL_LINE_ALIGNMENT    )
+DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit,     TextLabel, "verticalLineAlignment",     INTEGER, VERTICAL_LINE_ALIGNMENT    )
+DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit,     TextLabel, "textBackground",            MAP,     BACKGROUND                 )
 DALI_ANIMATABLE_PROPERTY_REGISTRATION_WITH_DEFAULT( Toolkit, TextLabel, "textColor",      Color::BLACK,     TEXT_COLOR     )
 DALI_ANIMATABLE_PROPERTY_COMPONENT_REGISTRATION( Toolkit,    TextLabel, "textColorRed",   TEXT_COLOR_RED,   TEXT_COLOR, 0  )
 DALI_ANIMATABLE_PROPERTY_COMPONENT_REGISTRATION( Toolkit,    TextLabel, "textColorGreen", TEXT_COLOR_GREEN, TEXT_COLOR, 1  )
@@ -523,6 +524,15 @@ void TextLabel::SetProperty( BaseObject* object, Property::Index index, const Pr
         }
         break;
       }
+      case Toolkit::DevelTextLabel::Property::BACKGROUND:
+      {
+        const bool update = SetBackgroundProperties( impl.mController, value, Text::EffectStyle::DEFAULT );
+        if( update )
+        {
+          impl.mTextUpdateNeeded = true;
+        }
+        break;
+      }
     }
 
     // Request relayout when text update is needed. It's necessary to call it
@@ -816,6 +826,11 @@ Property::Value TextLabel::GetProperty( BaseObject* object, Property::Index inde
         }
         break;
       }
+      case Toolkit::DevelTextLabel::Property::BACKGROUND:
+      {
+        GetBackgroundProperties( impl.mController, value, Text::EffectStyle::DEFAULT );
+        break;
+      }
     }
   }
 
old mode 100644 (file)
new mode 100755 (executable)
index 25dff01..1e6da13
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -63,6 +63,8 @@ DALI_PROPERTY_REGISTRATION( Toolkit, VideoView, "looping", BOOLEAN, LOOPING )
 DALI_PROPERTY_REGISTRATION( Toolkit, VideoView, "muted", BOOLEAN, MUTED )
 DALI_PROPERTY_REGISTRATION( Toolkit, VideoView, "volume", MAP, VOLUME )
 DALI_PROPERTY_REGISTRATION( Toolkit, VideoView, "underlay", BOOLEAN, UNDERLAY )
+DALI_PROPERTY_REGISTRATION( Toolkit, VideoView, "playPosition", INTEGER, PLAY_POSITION )
+DALI_PROPERTY_REGISTRATION( Toolkit, VideoView, "displayMode", INTEGER, DISPLAY_MODE )
 
 DALI_SIGNAL_REGISTRATION( Toolkit, VideoView, "finished", FINISHED_SIGNAL )
 
@@ -98,11 +100,10 @@ const char* VERTEX_SHADER = DALI_COMPOSE_SHADER(
 const char* FRAGMENT_SHADER = DALI_COMPOSE_SHADER(
   uniform lowp vec4 uColor;\n
   uniform lowp vec3 mixColor;\n
-  uniform lowp float opacity;\n
   \n
   void main()\n
   {\n
-    gl_FragColor = vec4(mixColor, opacity)*uColor;\n
+    gl_FragColor = vec4(mixColor, 1.0)*uColor;\n
   }\n
 );
 
@@ -451,6 +452,24 @@ void VideoView::SetProperty( BaseObject* object, Property::Index index, const Pr
         }
         break;
       }
+      case Toolkit::VideoView::Property::PLAY_POSITION:
+      {
+        int pos;
+        if( value.Get( pos ) )
+        {
+          impl.SetPlayPosition( pos );
+        }
+        break;
+      }
+      case Toolkit::VideoView::Property::DISPLAY_MODE:
+      {
+        int mode;
+        if( value.Get( mode ) )
+        {
+          impl.SetDisplayMode( mode );
+        }
+        break;
+      }
     }
   }
 }
@@ -504,6 +523,16 @@ Property::Value VideoView::GetProperty( BaseObject* object, Property::Index prop
         value = impl.IsUnderlay();
         break;
       }
+      case Toolkit::VideoView::Property::PLAY_POSITION:
+      {
+        value = impl.GetPlayPosition();
+        break;
+      }
+      case Toolkit::VideoView::Property::DISPLAY_MODE:
+      {
+        value = impl.GetDisplayMode();
+        break;
+      }
     }
   }
 
@@ -724,6 +753,40 @@ bool VideoView::IsUnderlay()
   return mIsUnderlay;
 }
 
+void VideoView::SetSWCodec( bool on )
+{
+  // If setting SW or HW type is failed , video-view shows video by default codec type.
+  // The default codec type is selected by platform.
+  if( on )
+  {
+    mVideoPlayer.SetCodecType( Dali::VideoPlayerPlugin::CodecType::SW );
+  }
+  else
+  {
+    mVideoPlayer.SetCodecType( Dali::VideoPlayerPlugin::CodecType::HW );
+  }
+}
+
+int VideoView::GetPlayPosition()
+{
+  return mVideoPlayer.GetPlayPosition();
+}
+
+void VideoView::SetPlayPosition( int pos )
+{
+  mVideoPlayer.SetPlayPosition( pos );
+}
+
+void VideoView::SetDisplayMode( int mode )
+{
+  mVideoPlayer.SetDisplayMode( static_cast< Dali::VideoPlayerPlugin::DisplayMode::Type >( mode ) );
+}
+
+int VideoView::GetDisplayMode() const
+{
+  return static_cast< int >( mVideoPlayer.GetDisplayMode() );
+}
+
 } // namespace Internal
 
 } // namespace toolkit
old mode 100644 (file)
new mode 100755 (executable)
index 5f85a3f..728539a
@@ -224,6 +224,31 @@ public:
    */
   bool IsUnderlay();
 
+  /**
+   * @brief Sets sw codec type.
+   */
+  void SetSWCodec( bool on );
+
+  /**
+   * @brief Gets play position.
+   */
+  int GetPlayPosition();
+
+  /**
+   * @brief Sets play position.
+   */
+  void SetPlayPosition( int pos );
+
+  /**
+   * @brief Sets Display mode.
+   */
+  void SetDisplayMode( int mode );
+
+  /**
+   * @brief Gets Display mode.
+   */
+  int GetDisplayMode() const;
+
 private: // From Control
 
   /**
index 7e0a181..857a55b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -20,6 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/image-loading.h>
+#include <dali/integration-api/adaptors/adaptor.h>
 
 namespace Dali
 {
@@ -56,7 +57,8 @@ void LoadingTask::Load()
 
 
 ImageLoadThread::ImageLoadThread( EventThreadCallback* trigger )
-: mTrigger( trigger )
+: mTrigger( trigger ),
+  mLogFactory( Dali::Adaptor::Get().GetLogFactory() )
 {
 }
 
@@ -72,6 +74,8 @@ ImageLoadThread::~ImageLoadThread()
 
 void ImageLoadThread::Run()
 {
+  mLogFactory.InstallLogFunction();
+
   while( LoadingTask* task = NextTaskToProcess() )
   {
     task->Load();
index 3d0ad24..c3f230c 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_TOOLKIT_IMAGE_LOAD_THREAD_H__
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -26,6 +26,7 @@
 #include <dali/devel-api/threading/thread.h>
 #include <dali/devel-api/adaptor-framework/event-thread-callback.h>
 #include <dali/devel-api/adaptor-framework/pixel-buffer.h>
+#include <dali/integration-api/adaptors/log-factory-interface.h>
 #include <dali-toolkit/internal/visuals/visual-url.h>
 
 namespace Dali
@@ -162,10 +163,11 @@ private:
 
   Vector< LoadingTask* > mLoadQueue;     ///<The task queue with images for loading.
   Vector< LoadingTask* > mCompleteQueue; ///<The task queue with images loaded.
+  EventThreadCallback*   mTrigger;
+  const Dali::LogFactoryInterface& mLogFactory; ///< The log factory
 
   ConditionalWait        mConditionalWait;
   Dali::Mutex            mMutex;
-  EventThreadCallback*   mTrigger;
 };
 
 } // namespace Internal
index dd429a1..af257ff 100644 (file)
@@ -109,7 +109,8 @@ struct Engine::Impl
   Impl()
   : mLayout( Layout::Engine::SINGLE_LINE_BOX ),
     mCursorWidth( CURSOR_WIDTH ),
-    mDefaultLineSpacing( LINE_SPACING )
+    mDefaultLineSpacing( LINE_SPACING ),
+    mPreviousCharacterExtraWidth( 0.0f )
   {
   }
 
@@ -345,6 +346,7 @@ struct Engine::Impl
 
             const float extraWidth = glyphMetrics.xBearing + glyphMetrics.width - glyphMetrics.advance;
             tmpExtraWidth = ( 0.f < extraWidth ) ? extraWidth : 0.f;
+            tmpExtraWidth = std::max( mPreviousCharacterExtraWidth - glyphMetrics.advance, tmpExtraWidth );
           }
         }
         else
@@ -358,6 +360,7 @@ struct Engine::Impl
 
               const float extraWidth = glyphMetrics.xBearing + glyphMetrics.width - glyphMetrics.advance;
               tmpExtraWidth = ( 0.f < extraWidth ) ? extraWidth : 0.f;
+              tmpExtraWidth = std::max( mPreviousCharacterExtraWidth - glyphMetrics.advance, tmpExtraWidth );
             }
             else // LTR
             {
@@ -385,6 +388,7 @@ struct Engine::Impl
 
               const float extraWidth = glyphMetrics.xBearing + glyphMetrics.width - glyphMetrics.advance;
               tmpExtraWidth = ( 0.f < extraWidth ) ? extraWidth : 0.f;
+              tmpExtraWidth = std::max( mPreviousCharacterExtraWidth - glyphMetrics.advance, tmpExtraWidth );
             }
           }
         }
@@ -393,6 +397,9 @@ struct Engine::Impl
         tmpLineLayout.wsLengthEndOfLine = 0.f;
       }
 
+      // Save the current extra width to compare with the next one
+      mPreviousCharacterExtraWidth = tmpExtraWidth;
+
       // Check if the accumulated length fits in the width of the box.
       if( ( completelyFill || isMultiline ) && !isWhiteSpace &&
           ( tmpExtraBearing + lineLayout.length + lineLayout.wsLengthEndOfLine + tmpLineLayout.length + tmpExtraWidth > parameters.boundingBox.width ) )
@@ -1217,6 +1224,7 @@ struct Engine::Impl
   Type mLayout;
   float mCursorWidth;
   float mDefaultLineSpacing;
+  float mPreviousCharacterExtraWidth;
 
   IntrusivePtr<Metrics> mMetrics;
 };
index 5bbe5ad..25b4616 100755 (executable)
@@ -153,6 +153,11 @@ void Initialize( FontDescriptionRun& fontRun )
  */
 void ParseAttributes( Tag& tag )
 {
+  if( tag.buffer == NULL )
+  {
+    return;
+  }
+
   tag.attributes.Resize( MAX_NUM_OF_ATTRIBUTES );
 
   // Find first the tag name.
index 990d0ce..7570e04 100644 (file)
@@ -101,11 +101,11 @@ MultilanguageSupport::MultilanguageSupport()
 {
   // Initializes the default font cache to zero (invalid font).
   // Reserves space to cache the default fonts and access them with the script as an index.
-  mDefaultFontPerScriptCache.Resize( TextAbstraction::UNKNOWN, NULL );
+  mDefaultFontPerScriptCache.Resize( TextAbstraction::UNKNOWN + 1, NULL );
 
   // Initializes the valid fonts cache to NULL (no valid fonts).
   // Reserves space to cache the valid fonts and access them with the script as an index.
-  mValidFontsPerScriptCache.Resize( TextAbstraction::UNKNOWN, NULL );
+  mValidFontsPerScriptCache.Resize( TextAbstraction::UNKNOWN + 1, NULL );
 }
 
 MultilanguageSupport::~MultilanguageSupport()
@@ -254,10 +254,6 @@ void MultilanguageSupport::SetScripts( const Vector<Character>& text,
         currentScriptRun.characterRun.numberOfCharacters += numberOfAllScriptCharacters;
 
         // Store the script run.
-        if( TextAbstraction::UNKNOWN == currentScriptRun.script )
-        {
-          currentScriptRun.script = TextAbstraction::LATIN;
-        }
         scripts.Insert( scripts.Begin() + scriptIndex, currentScriptRun );
         ++scriptIndex;
 
@@ -320,7 +316,6 @@ void MultilanguageSupport::SetScripts( const Vector<Character>& text,
       else if( ( TextAbstraction::UNKNOWN == currentScriptRun.script ) &&
                ( TextAbstraction::EMOJI == script ) )
       {
-        currentScriptRun.script = TextAbstraction::LATIN;
         currentScriptRun.characterRun.numberOfCharacters += numberOfAllScriptCharacters;
         numberOfAllScriptCharacters = 0u;
       }
@@ -357,12 +352,6 @@ void MultilanguageSupport::SetScripts( const Vector<Character>& text,
 
   if( 0u != currentScriptRun.characterRun.numberOfCharacters )
   {
-    if( TextAbstraction::UNKNOWN == currentScriptRun.script )
-    {
-      // There are only white spaces in the last script. Set the latin script.
-      currentScriptRun.script = TextAbstraction::LATIN;
-    }
-
     // Store the last run.
     scripts.Insert( scripts.Begin() + scriptIndex, currentScriptRun );
     ++scriptIndex;
@@ -490,10 +479,6 @@ void MultilanguageSupport::ValidateFonts( const Vector<Character>& text,
                      description.path.c_str() );
     }
 #endif
-    if( script == TextAbstraction::UNKNOWN )
-    {
-      script = TextAbstraction::LATIN;
-    }
 
     // Validate whether the current character is supported by the given font.
     bool isValidFont = false;
@@ -670,18 +655,21 @@ void MultilanguageSupport::ValidateFonts( const Vector<Character>& text,
                 fontId = fontClient.FindDefaultFont( UTF32_A, currentFontPointSize );
               }
 
-              // Cache the font.
-              if( NULL == defaultFontsPerScript )
+              if ( script != TextAbstraction::UNKNOWN )
               {
-                defaultFontsPerScript = *( defaultFontPerScriptCacheBuffer + script );
-
+                // Cache the font if it is not an unknown script
                 if( NULL == defaultFontsPerScript )
                 {
-                  defaultFontsPerScript = new DefaultFonts();
-                  *( defaultFontPerScriptCacheBuffer + script ) = defaultFontsPerScript;
+                  defaultFontsPerScript = *( defaultFontPerScriptCacheBuffer + script );
+
+                  if( NULL == defaultFontsPerScript )
+                  {
+                    defaultFontsPerScript = new DefaultFonts();
+                    *( defaultFontPerScriptCacheBuffer + script ) = defaultFontsPerScript;
+                  }
                 }
+                defaultFontsPerScript->Cache( currentFontDescription, fontId );
               }
-              defaultFontsPerScript->Cache( currentFontDescription, fontId );
             }
           } // !isValidFont (3)
         } // !isValidFont (2)
index 03d02f5..c6d1f80 100644 (file)
@@ -21,7 +21,6 @@
 // EXTERNAL INCLUDES
 #include <dali/public-api/rendering/geometry.h>
 #include <dali/public-api/rendering/renderer.h>
-#include <dali/public-api/images/frame-buffer-image.h>
 #include <dali/devel-api/text-abstraction/font-client.h>
 #include <dali/integration-api/debug.h>
 #include <dali/public-api/animation/constraints.h>
@@ -114,7 +113,6 @@ struct AtlasRenderer::Impl
 
     uint32_t mAtlasId;
     AtlasManager::Mesh2D mMesh;
-    FrameBufferImage mBuffer;
   };
 
   /**
index 901c477..c5fa932 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -85,14 +85,6 @@ void TypesetGlyph( GlyphData& data,
     // Pointer to the color glyph if there is one.
     const uint32_t* const colorGlyphBuffer = isColorGlyph ? reinterpret_cast<uint32_t*>( data.glyphBitmap.buffer ) : NULL;
 
-    // Pack the given color into a 32bit buffer. The alpha channel will be updated later for each pixel.
-    // The format is RGBA8888.
-    uint32_t packedColor = 0u;
-    uint8_t* packedColorBuffer = reinterpret_cast<uint8_t*>( &packedColor );
-    *( packedColorBuffer + 2 ) = static_cast<uint8_t>( color->b * 255.f );
-    *( packedColorBuffer + 1 ) = static_cast<uint8_t>( color->g * 255.f );
-      *packedColorBuffer       = static_cast<uint8_t>( color->r * 255.f );
-
     // Initial vertical offset.
     const int yOffset = data.verticalOffset + position->y;
 
@@ -126,27 +118,35 @@ void TypesetGlyph( GlyphData& data,
           uint32_t packedColorGlyph = *( colorGlyphBuffer + glyphBufferOffset + index );
           uint8_t* packedColorGlyphBuffer = reinterpret_cast<uint8_t*>( &packedColorGlyph );
 
-          if( Typesetter::STYLE_SHADOW == style )
-          {
-            // The shadow of color glyph needs to have the shadow color.
-            *( packedColorGlyphBuffer + 2 ) = static_cast<uint8_t>( color->b * 255.f );
-            *( packedColorGlyphBuffer + 1 ) = static_cast<uint8_t>( color->g * 255.f );
-              *packedColorGlyphBuffer       = static_cast<uint8_t>( color->r * 255.f );
-          }
-          else
-          {
-            std::swap( *packedColorGlyphBuffer, *( packedColorGlyphBuffer + 2u ) ); // Swap B and R.
-          }
-
           // Update the alpha channel.
           if( Typesetter::STYLE_MASK == style || Typesetter::STYLE_OUTLINE == style ) // Outline not shown for color glyph
           {
             // Create an alpha mask for color glyph.
             *( packedColorGlyphBuffer + 3u ) = 0u;
+            *( packedColorGlyphBuffer + 2u ) = 0u;
+            *( packedColorGlyphBuffer + 1u ) = 0u;
+              *packedColorGlyphBuffer        = 0u;
           }
           else
           {
-            *( packedColorGlyphBuffer + 3u ) = static_cast<uint8_t>( color->a * static_cast<float>( *( packedColorGlyphBuffer + 3u ) ) );
+            uint8_t colorAlpha = static_cast<uint8_t>( color->a * static_cast<float>( *( packedColorGlyphBuffer + 3u ) ) );
+            *( packedColorGlyphBuffer + 3u ) = colorAlpha;
+
+            if( Typesetter::STYLE_SHADOW == style )
+            {
+              // The shadow of color glyph needs to have the shadow color.
+              *( packedColorGlyphBuffer + 2u ) = static_cast<uint8_t>( color->b * colorAlpha );
+              *( packedColorGlyphBuffer + 1u ) = static_cast<uint8_t>( color->g * colorAlpha );
+                *packedColorGlyphBuffer        = static_cast<uint8_t>( color->r * colorAlpha );
+            }
+            else
+            {
+              std::swap( *packedColorGlyphBuffer, *( packedColorGlyphBuffer + 2u ) ); // Swap B and R.
+
+              *( packedColorGlyphBuffer + 2u ) = ( *( packedColorGlyphBuffer + 2u ) * colorAlpha / 255 );
+              *( packedColorGlyphBuffer + 1u ) = ( *( packedColorGlyphBuffer + 1u ) * colorAlpha / 255 );
+                *packedColorGlyphBuffer        = ( *( packedColorGlyphBuffer      ) * colorAlpha / 255 );
+            }
           }
 
           // Set the color into the final pixel buffer.
@@ -154,6 +154,11 @@ void TypesetGlyph( GlyphData& data,
         }
         else
         {
+          // Pack the given color into a 32bit buffer. The alpha channel will be updated later for each pixel.
+          // The format is RGBA8888.
+          uint32_t packedColor = 0u;
+          uint8_t* packedColorBuffer = reinterpret_cast<uint8_t*>( &packedColor );
+
           // Update the alpha channel.
           const uint8_t alpha = *( data.glyphBitmap.buffer + glyphBufferOffset + index );
 
@@ -164,14 +169,18 @@ void TypesetGlyph( GlyphData& data,
             uint32_t& currentColor = *( bitmapBuffer + verticalOffset + xOffsetIndex );
             uint8_t* packedCurrentColorBuffer = reinterpret_cast<uint8_t*>( &currentColor );
 
-            uint8_t currentAlpha = *( packedCurrentColorBuffer + 3u );
-            uint8_t newAlpha = static_cast<uint8_t>( color->a * static_cast<float>( alpha ) );
-
             // For any pixel overlapped with the pixel in previous glyphs, make sure we don't
             // overwrite a previous bigger alpha with a smaller alpha (in order to avoid
             // semi-transparent gaps between joint glyphs with overlapped pixels, which could
             // happen, for example, in the RTL text when we copy glyphs from right to left).
-            *( packedColorBuffer + 3u ) = std::max( currentAlpha, newAlpha );
+            uint8_t currentAlpha = *( packedCurrentColorBuffer + 3u );
+            currentAlpha = std::max( currentAlpha, alpha );
+
+            // Color is pre-muliplied with its alpha.
+            *( packedColorBuffer + 3u ) = static_cast<uint8_t>( color->a * currentAlpha );
+            *( packedColorBuffer + 2u ) = static_cast<uint8_t>( color->b * currentAlpha );
+            *( packedColorBuffer + 1u ) = static_cast<uint8_t>( color->g * currentAlpha );
+            *( packedColorBuffer      ) = static_cast<uint8_t>( color->r * currentAlpha );
 
             // Set the color into the final pixel buffer.
             currentColor = packedColor;
@@ -222,13 +231,12 @@ void TypesetGlyph( GlyphData& data,
           {
             // Check alpha of overlapped pixels
             uint8_t& currentAlpha = *( bitmapBuffer + verticalOffset + xOffsetIndex );
-            uint8_t newAlpha = static_cast<uint8_t>( color->a * static_cast<float>( alpha ) );
 
             // For any pixel overlapped with the pixel in previous glyphs, make sure we don't
             // overwrite a previous bigger alpha with a smaller alpha (in order to avoid
             // semi-transparent gaps between joint glyphs with overlapped pixels, which could
             // happen, for example, in the RTL text when we copy glyphs from right to left).
-            *( bitmapBuffer + verticalOffset + xOffsetIndex ) = std::max( currentAlpha, newAlpha );
+            *( bitmapBuffer + verticalOffset + xOffsetIndex ) = std::max( currentAlpha, alpha );
           }
         }
       }
@@ -423,6 +431,16 @@ PixelData Typesetter::Render( const Vector2& size, Toolkit::DevelText::TextDirec
       // Combine the two buffers
       imageBuffer = CombineImageBuffer( imageBuffer, underlineImageBuffer, bufferWidth, bufferHeight );
     }
+
+    // Generate the background if enabled
+    const bool backgroundEnabled = mModel->IsBackgroundEnabled();
+    if ( backgroundEnabled )
+    {
+      Devel::PixelBuffer backgroundImageBuffer = CreateImageBuffer( bufferWidth, bufferHeight, Typesetter::STYLE_BACKGROUND, ignoreHorizontalAlignment, pixelFormat, penX, penY, 0u, numberOfGlyphs -1 );
+
+      // Combine the two buffers
+      imageBuffer = CombineImageBuffer( imageBuffer, backgroundImageBuffer, bufferWidth, bufferHeight );
+    }
   }
 
   // Create the final PixelData for the combined image buffer
@@ -621,20 +639,25 @@ Devel::PixelBuffer Typesetter::CreateImageBuffer( const unsigned int bufferWidth
       // Retrieves the glyph's color.
       const ColorIndex colorIndex = *( colorIndexBuffer + glyphIndex );
 
-      const Vector4* color;
+      Vector4 color;
       if ( style == Typesetter::STYLE_SHADOW )
       {
-        color = &( mModel->GetShadowColor() );
+        color = mModel->GetShadowColor();
       }
       else if ( style == Typesetter::STYLE_OUTLINE )
       {
-        color = &( mModel->GetOutlineColor() );
+        color = mModel->GetOutlineColor();
       }
       else
       {
-        color = ( useDefaultColor || ( 0u == colorIndex ) ) ? &defaultColor : colorsBuffer + ( colorIndex - 1u );
+        color = ( useDefaultColor || ( 0u == colorIndex ) ) ? defaultColor : *( colorsBuffer + ( colorIndex - 1u ) );
       }
 
+      // Premultiply alpha
+      color.r *= color.a;
+      color.g *= color.a;
+      color.b *= color.a;
+
       // Retrieves the glyph's bitmap.
       glyphData.glyphBitmap.buffer = NULL;
       glyphData.glyphBitmap.width = glyphInfo->width;   // Desired width and height.
@@ -659,7 +682,7 @@ Devel::PixelBuffer Typesetter::CreateImageBuffer( const unsigned int bufferWidth
       {
         TypesetGlyph( glyphData,
                       position,
-                      color,
+                      &color,
                       style,
                       pixelFormat);
         // delete the glyphBitmap.buffer as it is now copied into glyphData.bitmapBuffer
@@ -695,16 +718,55 @@ Devel::PixelBuffer Typesetter::CreateImageBuffer( const unsigned int bufferWidth
           uint8_t* underlinePixelBuffer = reinterpret_cast<uint8_t*>( &underlinePixel );
 
           // Write the underline color to the pixel buffer
-          *( underlinePixelBuffer ) = static_cast<uint8_t>( underlineColor.r * 255.f );
-          *( underlinePixelBuffer + 1u ) = static_cast<uint8_t>( underlineColor.g * 255.f );
-          *( underlinePixelBuffer + 2u ) = static_cast<uint8_t>( underlineColor.b * 255.f );
-          *( underlinePixelBuffer + 3u ) = static_cast<uint8_t>( underlineColor.a * 255.f );
+          uint8_t colorAlpha = static_cast< uint8_t >( underlineColor.a * 255.f );
+          *( underlinePixelBuffer + 3u ) = colorAlpha;
+          *( underlinePixelBuffer + 2u ) = static_cast< uint8_t >( underlineColor.b * colorAlpha );
+          *( underlinePixelBuffer + 1u ) = static_cast< uint8_t >( underlineColor.g * colorAlpha );
+          *( underlinePixelBuffer      ) = static_cast< uint8_t >( underlineColor.r * colorAlpha );
 
           *( bitmapBuffer + y * glyphData.width + x ) = underlinePixel;
         }
       }
     }
 
+    // Draw the background color from the leftmost glyph to the rightmost glyph
+    if ( style == Typesetter::STYLE_BACKGROUND )
+    {
+      Vector4 backgroundColor = mModel->GetBackgroundColor();
+
+      for( int y = glyphData.verticalOffset + baseline - line.ascender; y < glyphData.verticalOffset + baseline - line.descender; y++ )
+      {
+        if( ( y < 0 ) || ( y > static_cast<int>(bufferHeight - 1) ) )
+        {
+          // Do not write out of bounds.
+          continue;
+        }
+
+        for( int x = glyphData.horizontalOffset + lineExtentLeft; x <= glyphData.horizontalOffset + lineExtentRight; x++ )
+        {
+          if( ( x < 0 ) || ( x > static_cast<int>(bufferWidth - 1) ) )
+          {
+            // Do not write out of bounds.
+            continue;
+          }
+
+          // Always RGBA image for text with styles
+          uint32_t* bitmapBuffer = reinterpret_cast< uint32_t* >( glyphData.bitmapBuffer.GetBuffer() );
+          uint32_t backgroundPixel = *( bitmapBuffer + y * glyphData.width + x );
+          uint8_t* backgroundPixelBuffer = reinterpret_cast<uint8_t*>( &backgroundPixel );
+
+          // Write the background color to the pixel buffer
+          uint8_t colorAlpha = static_cast< uint8_t >( backgroundColor.a * 255.f );
+          *( backgroundPixelBuffer + 3u ) = colorAlpha;
+          *( backgroundPixelBuffer + 2u ) = static_cast< uint8_t >( backgroundColor.b * colorAlpha );
+          *( backgroundPixelBuffer + 1u ) = static_cast< uint8_t >( backgroundColor.g * colorAlpha );
+          *( backgroundPixelBuffer      ) = static_cast< uint8_t >( backgroundColor.r * colorAlpha );
+
+          *( bitmapBuffer + y * glyphData.width + x ) = backgroundPixel;
+        }
+      }
+    }
+
     // Increases the vertical offset with the line's descender.
     glyphData.verticalOffset += static_cast<int>( -line.descender );
   }
@@ -751,15 +813,14 @@ Devel::PixelBuffer Typesetter::CombineImageBuffer( Devel::PixelBuffer topPixelBu
     // Otherwise, copy pixel from topBuffer to combinedBuffer.
 
     unsigned int alphaBuffer1 = topBuffer[pixelIndex*4+3];
-    unsigned int alphaBuffer2 = bottomBuffer[pixelIndex*4+3];
 
-    if ( alphaBuffer1 != 255 || alphaBuffer2 != 255 )
+    if ( alphaBuffer1 != 255 )
     {
       // At least one pixel is not fully opaque
       // "Over" blend the the pixel from topBuffer with the pixel in bottomBuffer
-      combinedBuffer[pixelIndex*4] = ( topBuffer[pixelIndex*4] * topBuffer[pixelIndex*4+3] / 255 ) + ( bottomBuffer[pixelIndex*4] * bottomBuffer[pixelIndex*4+3] * ( 255 - topBuffer[pixelIndex*4+3] ) / ( 255*255 ) );
-      combinedBuffer[pixelIndex*4+1] = ( topBuffer[pixelIndex*4+1] * topBuffer[pixelIndex*4+3] / 255 ) + ( bottomBuffer[pixelIndex*4+1] * bottomBuffer[pixelIndex*4+3] * ( 255 - topBuffer[pixelIndex*4+3] ) / ( 255*255 ) );
-      combinedBuffer[pixelIndex*4+2] = ( topBuffer[pixelIndex*4+2] * topBuffer[pixelIndex*4+3] / 255 ) + ( bottomBuffer[pixelIndex*4+2] * bottomBuffer[pixelIndex*4+3] * ( 255 - topBuffer[pixelIndex*4+3] ) / ( 255*255 ) );
+      combinedBuffer[pixelIndex*4] = topBuffer[pixelIndex*4] + ( bottomBuffer[pixelIndex*4] * ( 255 - topBuffer[pixelIndex*4+3] ) / 255 );
+      combinedBuffer[pixelIndex*4+1] = topBuffer[pixelIndex*4+1] + ( bottomBuffer[pixelIndex*4+1] * ( 255 - topBuffer[pixelIndex*4+3] ) / 255 );
+      combinedBuffer[pixelIndex*4+2] = topBuffer[pixelIndex*4+2] + ( bottomBuffer[pixelIndex*4+2] * ( 255 - topBuffer[pixelIndex*4+3] ) / 255 );
       combinedBuffer[pixelIndex*4+3] = topBuffer[pixelIndex*4+3] + ( bottomBuffer[pixelIndex*4+3] * ( 255 - topBuffer[pixelIndex*4+3] ) / 255 );
     }
     else
index 4d87891..3543fce 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -208,6 +208,16 @@ float ViewModel::GetOutlineWidth() const
   return mModel->GetOutlineWidth();
 }
 
+const Vector4& ViewModel::GetBackgroundColor() const
+{
+  return mModel->GetBackgroundColor();
+}
+
+bool ViewModel::IsBackgroundEnabled() const
+{
+  return mModel->IsBackgroundEnabled();
+}
+
 void ViewModel::ElideGlyphs()
 {
   mIsTextElided = false;
index 46c618f..65cf48c 100755 (executable)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_VIEW_MODEL_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -193,7 +193,17 @@ public:
    */
   virtual float GetOutlineWidth() const;
 
- /**
+  /**
+   * @copydoc ModelInterface::GetBackgroundColor()
+   */
+  virtual const Vector4& GetBackgroundColor() const;
+
+  /**
+   * @copydoc ModelInterface::IsBackgroundEnabled()
+   */
+  virtual bool IsBackgroundEnabled() const;
+
+/**
    * @brief Does the text elide.
    *
    * It stores a copy of the visible glyphs and removes as many glyphs as needed
index b40dba5..5f34488 100644 (file)
@@ -106,6 +106,7 @@ EventData::EventData( DecoratorPtr decorator )
   mAllTextSelected( false ),
   mUpdateInputStyle( false ),
   mPasswordInput( false ),
+  mCheckScrollAmount( false ),
   mIsPlaceholderPixelSize( false ),
   mIsPlaceholderElideEnabled( false ),
   mPlaceholderEllipsisFlag( false ),
index 136770c..f47b526 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -1217,6 +1217,30 @@ unsigned int Controller::GetOutlineWidth() const
   return mImpl->mModel->mVisualModel->GetOutlineWidth();
 }
 
+void Controller::SetBackgroundColor( const Vector4& color )
+{
+  mImpl->mModel->mVisualModel->SetBackgroundColor( color );
+
+  mImpl->RequestRelayout();
+}
+
+const Vector4& Controller::GetBackgroundColor() const
+{
+  return mImpl->mModel->mVisualModel->GetBackgroundColor();
+}
+
+void Controller::SetBackgroundEnabled( bool enabled )
+{
+  mImpl->mModel->mVisualModel->SetBackgroundEnabled( enabled );
+
+  mImpl->RequestRelayout();
+}
+
+bool Controller::IsBackgroundEnabled() const
+{
+  return mImpl->mModel->mVisualModel->IsBackgroundEnabled();
+}
+
 void Controller::SetDefaultEmbossProperties( const std::string& embossProperties )
 {
   if( NULL == mImpl->mEmbossDefaults )
@@ -2140,12 +2164,14 @@ Toolkit::DevelText::TextDirection::Type Controller::GetTextDirection()
   if ( mImpl->mUpdateTextDirection )
   {
     // Operations that can be done only once until the text changes.
-    const OperationsMask onlyOnceOperations = static_cast<OperationsMask>( GET_SCRIPTS       |
+    const OperationsMask onlyOnceOperations = static_cast<OperationsMask>( CONVERT_TO_UTF32  |
+                                                                           GET_SCRIPTS       |
                                                                            VALIDATE_FONTS    |
                                                                            GET_LINE_BREAKS   |
                                                                            GET_WORD_BREAKS   |
                                                                            BIDI_INFO         |
-                                                                           SHAPE_TEXT        );
+                                                                           SHAPE_TEXT        |
+                                                                           GET_GLYPH_METRICS );
 
     // Set the update info to relayout the whole text.
     mImpl->mTextUpdateInfo.mParagraphCharacterIndex = 0u;
@@ -2160,6 +2186,9 @@ Toolkit::DevelText::TextDirection::Type Controller::GetTextDirection()
                                              LAYOUT | REORDER | UPDATE_DIRECTION ),
                 naturalSize.GetVectorXY() );
 
+    // Do not do again the only once operations.
+    mImpl->mOperationsPending = static_cast<OperationsMask>( mImpl->mOperationsPending & ~onlyOnceOperations );
+
     // Clear the update info. This info will be set the next time the text is updated.
     mImpl->mTextUpdateInfo.Clear();
 
index 85c6818..b2321c4 100755 (executable)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_CONTROLLER_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -870,6 +870,34 @@ public: // Default style & Input style
   unsigned int GetOutlineWidth() const;
 
   /**
+   * @brief Set the background color.
+   *
+   * @param[in] color color of background.
+   */
+  void SetBackgroundColor( const Vector4& color );
+
+  /**
+   * @brief Retrieve the background color.
+   *
+   * @return The background color.
+   */
+  const Vector4& GetBackgroundColor() const;
+
+  /**
+   * @brief Set the background enabled flag.
+   *
+   * @param[in] enabled The background enabled flag.
+   */
+  void SetBackgroundEnabled( bool enabled );
+
+  /**
+   * @brief Returns whether to enable text background or not.
+   *
+   * @return Whether text background is enabled.
+   */
+  bool IsBackgroundEnabled() const;
+
+  /**
    * @brief Sets the emboss's properties string.
    *
    * @note The string is stored to be recovered.
index d8d35de..a3f07d6 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -200,6 +200,34 @@ bool ParseOutlineProperties( const Property::Map& underlinePropertiesMap,
   return 0u == numberOfItems;
 }
 
+bool ParseBackgroundProperties( const Property::Map& backgroundProperties,
+                                bool& enabled,
+                                bool& colorDefined,
+                                Vector4& color )
+{
+  const unsigned int numberOfItems = backgroundProperties.Count();
+
+  // Parses and applies the style.
+  for( unsigned int index = 0u; index < numberOfItems; ++index )
+  {
+    const KeyValuePair& valueGet = backgroundProperties.GetKeyValue( index );
+
+    if( ENABLE_KEY == valueGet.first.stringKey )
+    {
+      /// Enable key.
+      enabled = valueGet.second.Get<bool>();
+    }
+    else if( COLOR_KEY == valueGet.first.stringKey )
+    {
+      /// Color key.
+      colorDefined = true;
+      color = valueGet.second.Get<Vector4>();
+    }
+  }
+
+  return 0u == numberOfItems;
+}
+
 bool SetUnderlineProperties( ControllerPtr controller, const Property::Value& value, EffectStyle::Type type )
 {
   bool update = false;
@@ -666,6 +694,98 @@ void GetOutlineProperties( ControllerPtr controller, Property::Value& value, Eff
   }
 }
 
+bool SetBackgroundProperties( ControllerPtr controller, const Property::Value& value, EffectStyle::Type type )
+{
+  bool update = false;
+
+  if( controller )
+  {
+    switch( type )
+    {
+      case EffectStyle::DEFAULT:
+      {
+        const Property::Map& propertiesMap = value.Get<Property::Map>();
+
+        bool enabled = false;
+        bool colorDefined = false;
+        Vector4 color;
+
+        bool empty = true;
+
+        if ( !propertiesMap.Empty() )
+        {
+           empty = ParseBackgroundProperties( propertiesMap,
+                                              enabled,
+                                              colorDefined,
+                                              color );
+        }
+
+        if( !empty )
+        {
+          if( enabled != controller->IsBackgroundEnabled() )
+          {
+            controller->SetBackgroundEnabled( enabled );
+            update = true;
+          }
+
+          if( colorDefined && ( controller->GetBackgroundColor() != color ) )
+          {
+            controller->SetBackgroundColor( color );
+            update = true;
+          }
+        }
+        else
+        {
+          // Disable background.
+          if( controller->IsBackgroundEnabled() )
+          {
+            controller->SetBackgroundEnabled( false );
+            update = true;
+          }
+        }
+        break;
+      }
+      case EffectStyle::INPUT:
+      {
+        // Text background is not supported while inputting yet
+        break;
+      }
+    } // switch
+  } // if( controller )
+
+  return update;
+}
+
+void GetBackgroundProperties( ControllerPtr controller, Property::Value& value, EffectStyle::Type type )
+{
+  if( controller )
+  {
+    switch( type )
+    {
+      case EffectStyle::DEFAULT:
+      {
+        const bool enabled = controller->IsBackgroundEnabled();
+        const Vector4& color = controller->GetBackgroundColor();
+
+        Property::Map map;
+        map.Insert( ENABLE_KEY, enabled );
+        map.Insert( COLOR_KEY, color );
+
+        value = map;
+
+        break;
+
+      }
+      case EffectStyle::INPUT:
+      {
+        // Text background is not supported while inputting yet
+        break;
+      }
+    }
+  }
+}
+
+
 } // namespace Text
 
 } // namespace Toolkit
index e2b0f0c..240a76e 100755 (executable)
@@ -2,7 +2,7 @@
 #define __DALI_TOOLKIT_INTERNAL_TEXT_EFFECTS_STYLE_H__
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -86,6 +86,20 @@ bool ParseOutlineProperties( const Property::Map& outlineProperties,
                                bool& widthDefined,
                                unsigned int& width );
 
+
+/**
+ * @brief Parses the background properties.
+ *
+ * @param[in] backgroundProperties The map with the background properties.
+ * @param[out] enabled Whether the background is enabled.
+ * @param[out] colorDefined Whether the background color is defined.
+ * @param[out] color The background color.
+ */
+bool ParseBackgroundProperties( const Property::Map& backgroundProperties,
+                                bool& enabled,
+                                bool& colorDefined,
+                                Vector4& color );
+
 /**
  * @brief Sets the underline properties.
  *
@@ -166,6 +180,26 @@ bool SetOutlineProperties( ControllerPtr controller, const Property::Value& valu
  */
 void GetOutlineProperties( ControllerPtr controller, Property::Value& value, EffectStyle::Type type );
 
+/**
+ * @brief Sets the background properties.
+ *
+ * @param[in] controller The text's controller.
+ * @param[in] value The values of the background's properties.
+ * @param[in] type Whether the property is for the default background or the input background.
+ *
+ * @return Whether the background properties have been updated.
+ */
+bool SetBackgroundProperties( ControllerPtr controller, const Property::Value& value, EffectStyle::Type type );
+
+/**
+ * @brief Retrieves the background's properties.
+ *
+ * @param[in] controller The text's controller.
+ * @param[out] value The value of the underline's properties.
+ * @param[in] type Whether the property is for the default background or the input background.
+ */
+void GetBackgroundProperties( ControllerPtr controller, Property::Value& value, EffectStyle::Type type );
+
 } // namespace Text
 
 } // namespace Toolkit
index ab21d62..f2a82ad 100755 (executable)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_MODEL_INTERFACE_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -240,6 +240,20 @@ public:
    */
   virtual float GetOutlineWidth() const = 0;
 
+  /**
+   * @brief Retrieves the background color.
+   *
+   * @return The background color.
+   */
+  virtual const Vector4& GetBackgroundColor() const = 0;
+
+  /**
+   * @brief Returns whether background is enabled or not.
+   *
+   * @return The background state.
+   */
+  virtual bool IsBackgroundEnabled() const = 0;
+
 };
 
 } // namespace Text
index 7f23aac..84b0428 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -167,6 +167,16 @@ float Model::GetOutlineWidth() const
   return mVisualModel->GetOutlineWidth();
 }
 
+const Vector4& Model::GetBackgroundColor() const
+{
+  return mVisualModel->GetBackgroundColor();
+}
+
+bool Model::IsBackgroundEnabled() const
+{
+  return mVisualModel->IsBackgroundEnabled();
+}
+
 Model::Model()
 : mLogicalModel(),
   mVisualModel(),
index 9422996..cb8d77c 100755 (executable)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_MODEL_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -193,6 +193,16 @@ public:
    */
   virtual float GetOutlineWidth() const;
 
+  /**
+   * @copydoc ModelInterface::GetBackgroundColor()
+   */
+  virtual const Vector4& GetBackgroundColor() const;
+
+  /**
+   * @copydoc ModelInterface::IsBackgroundEnabled()
+   */
+  virtual bool IsBackgroundEnabled() const;
+
 private: // Private contructors & copy operator.
 
   /**
index fab9327..e6da930 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -80,23 +80,16 @@ const char* FRAGMENT_SHADER = DALI_COMPOSE_SHADER(
   uniform sampler2D sTexture;\n
   uniform lowp vec4 uColor;\n
   uniform lowp vec3 mixColor;\n
-  uniform lowp float opacity;\n
   uniform lowp float preMultipliedAlpha;\n
   \n
-  lowp vec4 visualMixColor()\n
-  {\n
-    return vec4( mixColor * mix( 1.0, opacity, preMultipliedAlpha ), opacity );\n
-  }\n
-  \n
   void main()\n
   {\n
     if ( vTexCoord.y > 1.0 )\n
       discard;\n
     \n
     mediump vec4 textTexture = texture2D( sTexture, vTexCoord );\n
-    textTexture.rgb *= mix( 1.0, textTexture.a, preMultipliedAlpha );\n
     \n
-    gl_FragColor = textTexture * uColor * visualMixColor();
+    gl_FragColor = textTexture * uColor * vec4( mixColor, 1.0 );
   }\n
 );
 
index e359dc7..bd567a4 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -378,6 +378,16 @@ void VisualModel::SetOutlineWidth( unsigned int width )
   mOutlineWidth = width;
 }
 
+void VisualModel::SetBackgroundColor( const Vector4& color )
+{
+  mBackgroundColor = color;
+}
+
+void VisualModel::SetBackgroundEnabled( bool enabled )
+{
+  mBackgroundEnabled = enabled;
+}
+
 const Vector4& VisualModel::GetTextColor() const
 {
   return mTextColor;
@@ -423,6 +433,16 @@ unsigned int VisualModel::GetOutlineWidth() const
   return mOutlineWidth;
 }
 
+const Vector4& VisualModel::GetBackgroundColor() const
+{
+  return mBackgroundColor;
+}
+
+bool VisualModel::IsBackgroundEnabled() const
+{
+  return mBackgroundEnabled;
+}
+
 Length VisualModel::GetNumberOfUnderlineRuns() const
 {
   return mUnderlineRuns.Count();
@@ -449,6 +469,7 @@ VisualModel::VisualModel()
   mShadowColor( Color::BLACK ),
   mUnderlineColor( Color::BLACK ),
   mOutlineColor( Color::WHITE ),
+  mBackgroundColor( Color::CYAN ),
   mControlSize(),
   mShadowOffset(),
   mUnderlineHeight( 0.0f ),
@@ -458,7 +479,8 @@ VisualModel::VisualModel()
   mLayoutSize(),
   mCachedLineIndex( 0u ),
   mUnderlineEnabled( false ),
-  mUnderlineColorSet( false )
+  mUnderlineColorSet( false ),
+  mBackgroundEnabled( false )
 {
 }
 
index 24be0c7..1cb6b4d 100755 (executable)
@@ -2,7 +2,7 @@
 #define __DALI_TOOLKIT_TEXT_VISUAL_MODEL_IMPL_H__
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -329,6 +329,34 @@ public:
    */
   unsigned int GetOutlineWidth() const;
 
+  /**
+   * @brief Sets the text's background color.
+   *
+   * @param[in] color The text's background color.
+   */
+  void SetBackgroundColor( const Vector4& color );
+
+  /**
+   * @brief Retrieves the text's background color.
+   *
+   * @return The text's background color.
+   */
+  const Vector4& GetBackgroundColor() const;
+
+  /**
+   * @brief Sets whether the text has a background or not.
+   *
+   * @param[in] enabled true if the text has a background.
+   */
+  void SetBackgroundEnabled( bool enabled );
+
+  /**
+   * @brief Returns whether the text has a background or not.
+   *
+   * @return whether the text has a background or not.
+   */
+  bool IsBackgroundEnabled() const;
+
 protected:
 
   /**
@@ -366,6 +394,7 @@ public:
   Vector4                mShadowColor;          ///< Color of drop shadow
   Vector4                mUnderlineColor;       ///< Color of underline
   Vector4                mOutlineColor;         ///< Color of outline
+  Vector4                mBackgroundColor;      ///< Color of text background
   Size                   mControlSize;          ///< The size of the UI control.
   Vector2                mShadowOffset;         ///< Offset for drop shadow, 0 indicates no shadow
   float                  mUnderlineHeight;      ///< Fixed height for underline to override font metrics.
@@ -384,6 +413,7 @@ public:
 
   bool                   mUnderlineEnabled:1;   ///< Underline enabled flag
   bool                   mUnderlineColorSet:1;  ///< Has the underline color been explicitly set?
+  bool                   mBackgroundEnabled:1;   ///< Background enabled flag
 };
 
 } // namespace Text
index 13ce737..fcb3811 100755 (executable)
@@ -154,7 +154,7 @@ AnimatedImageVisualPtr AnimatedImageVisual::New( VisualFactoryCache& factoryCach
 void AnimatedImageVisual::InitializeGif( const VisualUrl& imageUrl )
 {
   mImageUrl = imageUrl;
-  mGifLoading = GifLoading::New( imageUrl.GetUrl() );
+  mGifLoading = GifLoading::New( imageUrl.GetUrl(), imageUrl.IsLocalResource() );
   mFrameCount = mGifLoading->GetImageCount();
   mGifLoading->LoadFrameDelays( mFrameDelayContainer );
 }
@@ -332,7 +332,7 @@ void AnimatedImageVisual::DoSetProperty( Property::Index index,
     }
     case Toolkit::ImageVisual::Property::WRAP_MODE_U:
     {
-      int wrapMode;
+      int wrapMode = 0;
       if(Scripting::GetEnumerationProperty( value, WRAP_MODE_TABLE, WRAP_MODE_TABLE_COUNT, wrapMode ))
       {
         mWrapModeU = Dali::WrapMode::Type(wrapMode);
@@ -345,7 +345,7 @@ void AnimatedImageVisual::DoSetProperty( Property::Index index,
     }
     case Toolkit::ImageVisual::Property::WRAP_MODE_V:
     {
-      int wrapMode;
+      int wrapMode = 0;
       if(Scripting::GetEnumerationProperty( value, WRAP_MODE_TABLE, WRAP_MODE_TABLE_COUNT, wrapMode ))
       {
         mWrapModeV = Dali::WrapMode::Type(wrapMode);
index b1713d2..dd06d31 100644 (file)
@@ -45,9 +45,12 @@ FixedImageCache::FixedImageCache(
 
 FixedImageCache::~FixedImageCache()
 {
-  for( std::size_t i = 0; i < mImageUrls.size() ; ++i )
+  if( mTextureManagerAlive )
   {
-    mTextureManager.Remove( mImageUrls[i].mTextureId );
+    for( std::size_t i = 0; i < mImageUrls.size() ; ++i )
+    {
+      mTextureManager.Remove( mImageUrls[i].mTextureId );
+    }
   }
 }
 
index 84e5f66..78ca796 100644 (file)
@@ -31,12 +31,23 @@ ImageCache::ImageCache( TextureManager&                 textureManager,
   mBatchSize( batchSize ),
   mUrlIndex(0u),
   mWaitingForReadyFrame(false),
-  mRequestingLoad(false)
+  mRequestingLoad(false),
+  mTextureManagerAlive(true)
 {
+  mTextureManager.AddObserver( *this );
 }
 
 ImageCache::~ImageCache()
 {
+  if( mTextureManagerAlive )
+  {
+    mTextureManager.RemoveObserver( *this );
+  }
+}
+
+void ImageCache::TextureManagerDestroyed()
+{
+  mTextureManagerAlive = false;
 }
 
 } //namespace Internal
index 1a7ae75..e8277de 100644 (file)
@@ -28,7 +28,7 @@ namespace Toolkit
 namespace Internal
 {
 
-class ImageCache
+class ImageCache : public TextureManager::LifecycleObserver
 {
 public:
   /**
@@ -85,6 +85,12 @@ public:
    */
   virtual TextureSet NextFrame() = 0;
 
+private:
+  /**
+   * Called before the texture manager is destroyed.
+   */
+  virtual void TextureManagerDestroyed() override final;
+
 protected:
   TextureManager&        mTextureManager;
   FrameReadyObserver&    mObserver;
@@ -92,6 +98,7 @@ protected:
   unsigned int           mUrlIndex;
   bool                   mWaitingForReadyFrame:1;
   bool                   mRequestingLoad:1;
+  bool                   mTextureManagerAlive:1;
 };
 
 } //namespace Internal
index ed61adb..9f9e623 100644 (file)
@@ -74,13 +74,17 @@ RollingGifImageCache::RollingGifImageCache(
 
 RollingGifImageCache::~RollingGifImageCache()
 {
-  while( !mQueue.IsEmpty() )
+  if( mTextureManagerAlive )
   {
-    ImageFrame imageFrame = mQueue.PopFront();
-    Dali::Toolkit::TextureManager::RemoveTexture( mImageUrls[ imageFrame.mFrameNumber ].mUrl );
+    while( !mQueue.IsEmpty() )
+    {
+      ImageFrame imageFrame = mQueue.PopFront();
+      Dali::Toolkit::TextureManager::RemoveTexture( mImageUrls[ imageFrame.mFrameNumber ].mUrl );
+    }
   }
 }
 
+
 TextureSet RollingGifImageCache::FirstFrame()
 {
   return GetFrontTextureSet();
index 37c7a7d..bee7234 100644 (file)
@@ -70,10 +70,13 @@ RollingImageCache::RollingImageCache(
 
 RollingImageCache::~RollingImageCache()
 {
-  while( !mQueue.IsEmpty() )
+  if( mTextureManagerAlive )
   {
-    ImageFrame imageFrame = mQueue.PopFront();
-    mTextureManager.Remove( mImageUrls[ imageFrame.mUrlIndex ].mTextureId );
+    while( !mQueue.IsEmpty() )
+    {
+      ImageFrame imageFrame = mQueue.PopFront();
+      mTextureManager.Remove( mImageUrls[ imageFrame.mUrlIndex ].mTextureId );
+    }
   }
 }
 
index cf1d6f4..993bcde 100644 (file)
@@ -83,11 +83,10 @@ const char* FRAGMENT_SHADER = DALI_COMPOSE_SHADER(
   uniform lowp vec4 uColor;\n
   uniform lowp vec4 borderColor;\n
   uniform lowp vec3 mixColor;\n
-  uniform lowp float opacity;\n
   \n
   void main()\n
   {\n
-    gl_FragColor = vec4(mixColor, opacity)*borderColor*uColor;\n
+    gl_FragColor = vec4(mixColor, 1.0)*borderColor*uColor;\n
   }\n
 );
 
@@ -111,13 +110,12 @@ const char* FRAGMENT_SHADER_ANTI_ALIASING = DALI_COMPOSE_SHADER(
   uniform lowp vec4 uColor;\n
   uniform lowp vec4 borderColor;\n
   uniform lowp vec3 mixColor;\n
-  uniform lowp float opacity;\n
   uniform mediump float borderSize;\n
   varying mediump float vAlpha;\n
   \n
   void main()\n
   {\n
-    gl_FragColor = vec4(mixColor, opacity)*borderColor*uColor;\n
+    gl_FragColor = vec4(mixColor, 1.0)*borderColor*uColor;\n
     gl_FragColor.a *= smoothstep(0.0, 1.5, vAlpha)*smoothstep( borderSize+1.5, borderSize, vAlpha );\n
   }\n
 );
index 8228550..fdc4835 100644 (file)
@@ -72,11 +72,10 @@ const char* VERTEX_SHADER = DALI_COMPOSE_SHADER(
 const char* FRAGMENT_SHADER = DALI_COMPOSE_SHADER(
   uniform lowp vec4 uColor;\n
   uniform lowp vec3 mixColor;\n
-  uniform lowp float opacity;\n
   \n
   void main()\n
   {\n
-    gl_FragColor = vec4(mixColor, opacity)*uColor;\n
+    gl_FragColor = vec4(mixColor, 1.0)*uColor;\n
   }\n
 );
 }
index e54d811..aaf4f03 100644 (file)
@@ -173,12 +173,11 @@ DALI_COMPOSE_SHADER(
   uniform sampler2D sTexture;\n // sampler1D?
   uniform lowp vec4 uColor;\n
   uniform lowp vec3 mixColor;\n
-  uniform lowp float opacity;\n
   varying mediump vec2 vTexCoord;\n
   \n
   void main()\n
   {\n
-    gl_FragColor = texture2D( sTexture, vec2( vTexCoord.y, 0.5 ) ) * vec4(mixColor*opacity, opacity) * uColor;\n
+    gl_FragColor = texture2D( sTexture, vec2( vTexCoord.y, 0.5 ) ) * vec4(mixColor, 1.0) * uColor;\n
   }\n
 ),
 
@@ -187,12 +186,11 @@ DALI_COMPOSE_SHADER(
   uniform sampler2D sTexture;\n // sampler1D?
   uniform lowp vec4 uColor;\n
   uniform lowp vec3 mixColor;\n
-  uniform lowp float opacity;\n
   varying mediump vec2 vTexCoord;\n
   \n
   void main()\n
   {\n
-    gl_FragColor = texture2D( sTexture, vec2( length(vTexCoord), 0.5 ) ) * vec4(mixColor*opacity, opacity) * uColor;\n
+    gl_FragColor = texture2D( sTexture, vec2( length(vTexCoord), 0.5 ) ) * vec4(mixColor, 1.0) * uColor;\n
   }\n
 )
 };
index 5917754..6aaa271 100644 (file)
@@ -152,16 +152,11 @@ const char* FRAGMENT_SHADER_NO_ATLAS = DALI_COMPOSE_SHADER(
   uniform sampler2D sTexture;\n
   uniform lowp vec4 uColor;\n
   uniform lowp vec3 mixColor;\n
-  uniform lowp float opacity;\n
   uniform lowp float preMultipliedAlpha;\n
   \n
-  lowp vec4 visualMixColor()\n
-  {\n
-    return vec4( mixColor * mix( 1.0, opacity, preMultipliedAlpha ), opacity );\n
-  }\n
   void main()\n
   {\n
-      gl_FragColor = texture2D( sTexture, vTexCoord ) * uColor * visualMixColor();\n
+      gl_FragColor = texture2D( sTexture, vTexCoord ) * uColor * vec4( mixColor, 1.0 );\n
   }\n
 );
 
@@ -171,18 +166,12 @@ const char* FRAGMENT_SHADER_ATLAS_CLAMP = DALI_COMPOSE_SHADER(
     uniform mediump vec4 uAtlasRect;\n
     uniform lowp vec4 uColor;\n
     uniform lowp vec3 mixColor;\n
-    uniform lowp float opacity;\n
     uniform lowp float preMultipliedAlpha;\n
     \n
-    lowp vec4 visualMixColor()\n
-    {\n
-        return vec4( mixColor * mix( 1.0, opacity, preMultipliedAlpha ), opacity );\n
-    }\n
-    \n
     void main()\n
     {\n
         mediump vec2 texCoord = clamp( mix( uAtlasRect.xy, uAtlasRect.zw, vTexCoord ), uAtlasRect.xy, uAtlasRect.zw );\n
-        gl_FragColor = texture2D( sTexture, texCoord ) * uColor * visualMixColor();\n
+        gl_FragColor = texture2D( sTexture, texCoord ) * uColor * vec4( mixColor, 1.0 );\n
      }\n
 );
 
@@ -194,7 +183,6 @@ const char* FRAGMENT_SHADER_ATLAS_VARIOUS_WRAP = DALI_COMPOSE_SHADER(
     uniform lowp vec2 wrapMode;\n
     uniform lowp vec4 uColor;\n
     uniform lowp vec3 mixColor;\n
-    uniform lowp float opacity;\n
     uniform lowp float preMultipliedAlpha;\n
     \n
     mediump float wrapCoordinate( mediump vec2 range, mediump float coordinate, lowp float wrap )\n
@@ -207,16 +195,11 @@ const char* FRAGMENT_SHADER_ATLAS_VARIOUS_WRAP = DALI_COMPOSE_SHADER(
       return clamp( mix(range.x, range.y, coord), range.x, range.y );
     }\n
     \n
-    lowp vec4 visualMixColor()\n
-    {\n
-      return vec4( mixColor * mix( 1.0, opacity, preMultipliedAlpha ), opacity );\n
-    }\n
-    \n
     void main()\n
     {\n
         mediump vec2 texCoord = vec2( wrapCoordinate( uAtlasRect.xz, vTexCoord.x, wrapMode.x ),
                                       wrapCoordinate( uAtlasRect.yw, vTexCoord.y, wrapMode.y ) );\n
-        gl_FragColor = texture2D( sTexture, texCoord ) * uColor * visualMixColor();\n
+        gl_FragColor = texture2D( sTexture, texCoord ) * uColor * vec4( mixColor, 1.0 );\n
     }\n
 );
 
@@ -269,7 +252,7 @@ ImageVisual::ImageVisual( VisualFactoryCache& factoryCache,
                           ImageDimensions size,
                           FittingMode::Type fittingMode,
                           Dali::SamplingMode::Type samplingMode )
-: Visual::Base( factoryCache, Visual::FittingMode::FIT_KEEP_ASPECT_RATIO ),
+: Visual::Base( factoryCache, Visual::FittingMode::FILL ),
   mImage(),
   mPixelArea( FULL_TEXTURE_RECT ),
   mPlacementActor(),
@@ -427,7 +410,7 @@ void ImageVisual::DoSetProperty( Property::Index index, const Property::Value& v
   {
     case Toolkit::ImageVisual::Property::SYNCHRONOUS_LOADING:
     {
-      bool sync;
+      bool sync = false;
       if( value.Get( sync ) )
       {
         if( sync )
@@ -448,7 +431,7 @@ void ImageVisual::DoSetProperty( Property::Index index, const Property::Value& v
 
     case Toolkit::ImageVisual::Property::DESIRED_WIDTH:
     {
-      float desiredWidth;
+      float desiredWidth = 0.0f;
       if( value.Get( desiredWidth ) )
       {
         mDesiredSize.SetWidth( desiredWidth );
@@ -462,7 +445,7 @@ void ImageVisual::DoSetProperty( Property::Index index, const Property::Value& v
 
     case Toolkit::ImageVisual::Property::DESIRED_HEIGHT:
     {
-      float desiredHeight;
+      float desiredHeight = 0.0f;
       if( value.Get( desiredHeight ) )
       {
         mDesiredSize.SetHeight( desiredHeight );
@@ -476,7 +459,7 @@ void ImageVisual::DoSetProperty( Property::Index index, const Property::Value& v
 
     case Toolkit::ImageVisual::Property::FITTING_MODE:
     {
-      int fittingMode;
+      int fittingMode = 0;
       Scripting::GetEnumerationProperty( value, FITTING_MODE_TABLE, FITTING_MODE_TABLE_COUNT, fittingMode );
       mFittingMode = Dali::FittingMode::Type( fittingMode );
       break;
@@ -484,7 +467,7 @@ void ImageVisual::DoSetProperty( Property::Index index, const Property::Value& v
 
     case Toolkit::ImageVisual::Property::SAMPLING_MODE:
     {
-      int samplingMode;
+      int samplingMode = 0;
       Scripting::GetEnumerationProperty( value, SAMPLING_MODE_TABLE, SAMPLING_MODE_TABLE_COUNT, samplingMode );
       mSamplingMode = Dali::SamplingMode::Type( samplingMode );
       break;
@@ -498,7 +481,7 @@ void ImageVisual::DoSetProperty( Property::Index index, const Property::Value& v
 
     case Toolkit::ImageVisual::Property::WRAP_MODE_U:
     {
-      int wrapMode;
+      int wrapMode = 0;
       Scripting::GetEnumerationProperty( value, WRAP_MODE_TABLE, WRAP_MODE_TABLE_COUNT, wrapMode );
       mWrapModeU = Dali::WrapMode::Type( wrapMode );
       break;
@@ -506,7 +489,7 @@ void ImageVisual::DoSetProperty( Property::Index index, const Property::Value& v
 
     case Toolkit::ImageVisual::Property::WRAP_MODE_V:
     {
-      int wrapMode;
+      int wrapMode = 0;
       Scripting::GetEnumerationProperty( value, WRAP_MODE_TABLE, WRAP_MODE_TABLE_COUNT, wrapMode );
       mWrapModeV = Dali::WrapMode::Type( wrapMode );
       break;
@@ -520,7 +503,7 @@ void ImageVisual::DoSetProperty( Property::Index index, const Property::Value& v
 
     case Toolkit::ImageVisual::Property::ALPHA_MASK_URL:
     {
-      std::string alphaUrl;
+      std::string alphaUrl = "";
       if( value.Get( alphaUrl ) )
       {
         AllocateMaskData();
@@ -534,7 +517,7 @@ void ImageVisual::DoSetProperty( Property::Index index, const Property::Value& v
 
     case Toolkit::ImageVisual::Property::MASK_CONTENT_SCALE:
     {
-      float scale;
+      float scale = 1.0f;
       if( value.Get( scale ) )
       {
         AllocateMaskData();
@@ -556,7 +539,7 @@ void ImageVisual::DoSetProperty( Property::Index index, const Property::Value& v
 
     case Toolkit::ImageVisual::Property::RELEASE_POLICY:
     {
-      int releasePolicy;
+      int releasePolicy = 0;
       Scripting::GetEnumerationProperty( value, RELEASE_POLICY_TABLE, RELEASE_POLICY_TABLE_COUNT, releasePolicy );
       mReleasePolicy = Toolkit::ImageVisual::ReleasePolicy::Type( releasePolicy );
       break;
@@ -564,7 +547,7 @@ void ImageVisual::DoSetProperty( Property::Index index, const Property::Value& v
 
     case Toolkit::ImageVisual::Property::LOAD_POLICY:
     {
-      int loadPolicy;
+      int loadPolicy = 0;
       Scripting::GetEnumerationProperty( value, LOAD_POLICY_TABLE, LOAD_POLICY_TABLE_COUNT, loadPolicy );
       mLoadPolicy = Toolkit::ImageVisual::LoadPolicy::Type( loadPolicy );
       break;
index f7ed731..0d81192 100644 (file)
@@ -165,16 +165,11 @@ const char* SIMPLE_FRAGMENT_SHADER = DALI_COMPOSE_SHADER(
   varying mediump vec3 vIllumination;\n
   uniform lowp vec4 uColor;\n
   uniform lowp vec3 mixColor;\n
-  uniform lowp float opacity;\n
   uniform lowp float preMultipliedAlpha;\n
 
-  lowp vec4 visualMixColor()\n
-  {\n
-    return vec4( mixColor * mix( 1.0, opacity, preMultipliedAlpha ), opacity );\n
-  }\n
   void main()\n
   {\n
-    gl_FragColor = vec4( vIllumination.rgb * uColor.rgb, uColor.a ) * visualMixColor();\n
+    gl_FragColor = vec4( vIllumination.rgb * uColor.rgb, uColor.a ) * vec4( mixColor, 1.0 );\n
   }\n
 );
 
@@ -249,17 +244,12 @@ const char* FRAGMENT_SHADER = DALI_COMPOSE_SHADER(
   uniform sampler2D sDiffuse;\n
   uniform lowp vec4 uColor;\n
   uniform lowp vec3 mixColor;\n
-  uniform lowp float opacity;\n
   uniform lowp float preMultipliedAlpha;\n
 
-  lowp vec4 visualMixColor()\n
-  {\n
-    return vec4( mixColor * mix( 1.0, opacity, preMultipliedAlpha ), opacity );\n
-  }\n
   void main()\n
   {\n
     vec4 texture = texture2D( sDiffuse, vTexCoord );\n
-    vec4 visualMixColor = visualMixColor();\n
+    vec4 visualMixColor = vec4( mixColor, 1.0 );\n
     gl_FragColor = vec4( vIllumination.rgb * texture.rgb * uColor.rgb * visualMixColor.rgb + vSpecular * 0.3, texture.a * uColor.a * visualMixColor.a );\n
   }\n
 );
@@ -342,19 +332,14 @@ const char* NORMAL_MAP_FRAGMENT_SHADER = DALI_COMPOSE_SHADER(
   uniform sampler2D sGloss;\n
   uniform lowp vec4 uColor;\n
   uniform lowp vec3 mixColor;\n
-  uniform lowp float opacity;\n
   uniform lowp float preMultipliedAlpha;\n
 
-  lowp vec4 visualMixColor()\n
-  {\n
-    return vec4( mixColor * mix( 1.0, opacity, preMultipliedAlpha ), opacity );\n
-  }\n
   void main()\n
   {\n
     vec4 texture = texture2D( sDiffuse, vTexCoord );\n
     vec3 normal = normalize( texture2D( sNormal, vTexCoord ).xyz * 2.0 - 1.0 );\n
     vec4 glossMap = texture2D( sGloss, vTexCoord );\n
-    vec4 visualMixColor = visualMixColor();\n
+    vec4 visualMixColor = vec4( mixColor, 1.0 );\n
 
     float lightDiffuse = max( 0.0, dot( normal, normalize( vLightDirection ) ) );\n
     lightDiffuse = lightDiffuse * 0.5 + 0.5;\n
index afb517b..971c73d 100755 (executable)
@@ -141,15 +141,11 @@ const char* FRAGMENT_SHADER = DALI_COMPOSE_SHADER(
   uniform sampler2D sTexture;\n
   uniform lowp vec4 uColor;\n
   uniform lowp vec3 mixColor;\n
-  uniform lowp float opacity;\n
   uniform lowp float preMultipliedAlpha;\n
-  lowp vec4 visualMixColor()\n
-  {\n
-    return vec4( mixColor * mix( 1.0, opacity, preMultipliedAlpha ), opacity );\n
-  }\n
+  \n
   void main()\n
   {\n
-    gl_FragColor = texture2D( sTexture, vTexCoord ) * uColor * visualMixColor();\n
+    gl_FragColor = texture2D( sTexture, vTexCoord ) * uColor * vec4( mixColor, 1.0 );\n
   }\n
 );
 
@@ -160,13 +156,9 @@ const char* FRAGMENT_MASK_SHADER = DALI_COMPOSE_SHADER(
   uniform sampler2D sMask;\n
   uniform lowp vec4 uColor;\n
   uniform lowp vec3 mixColor;\n
-  uniform lowp float opacity;\n
   uniform lowp float preMultipliedAlpha;\n
   uniform mediump float auxiliaryImageAlpha;\n
-  lowp vec4 visualMixColor()\n
-  {\n
-    return vec4( mixColor * mix( 1.0, opacity, preMultipliedAlpha ), opacity );\n
-  }\n
+  \n
   void main()\n
   {\n
       // Where mask image is transparent, all of background image must show through.
@@ -179,7 +171,7 @@ const char* FRAGMENT_MASK_SHADER = DALI_COMPOSE_SHADER(
 
       mediump vec3 mixedColor = color.rgb * mix( 1.0-mask.a, 1.0, 1.0-auxiliaryImageAlpha)
                                 + mask.rgb*mask.a * auxiliaryImageAlpha;\n
-      gl_FragColor = vec4(mixedColor,1.0) * uColor * visualMixColor();\n
+      gl_FragColor = vec4(mixedColor,1.0) * uColor * vec4( mixColor, 1.0 );\n
   }\n
 );
 
index e097ec8..103529b 100644 (file)
@@ -46,12 +46,13 @@ namespace
 // shapes
 DALI_ENUM_TO_STRING_TABLE_BEGIN( SHAPE_TYPE )
 DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::PrimitiveVisual::Shape, SPHERE )
-DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::PrimitiveVisual::Shape, CONICAL_FRUSTRUM )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::PrimitiveVisual::Shape, CONICAL_FRUSTRUM ) // deprecated
 DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::PrimitiveVisual::Shape, CONE )
 DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::PrimitiveVisual::Shape, CYLINDER )
 DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::PrimitiveVisual::Shape, CUBE )
 DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::PrimitiveVisual::Shape, OCTAHEDRON )
 DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::PrimitiveVisual::Shape, BEVELLED_CUBE )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::PrimitiveVisual::Shape, CONICAL_FRUSTUM )
 DALI_ENUM_TO_STRING_TABLE_END( SHAPE_TYPE )
 
 //Property names
@@ -70,8 +71,8 @@ const char * const LIGHT_POSITION_UNIFORM_NAME( "lightPosition" );
 //Primitive property defaults
 const int     DEFAULT_SLICES =              128; ///< For spheres and conics
 const int     DEFAULT_STACKS =              128; ///< For spheres and conics
-const float   DEFAULT_SCALE_TOP_RADIUS =    1.0; ///< For conical frustrums
-const float   DEFAULT_SCALE_BOTTOM_RADIUS = 1.5; ///< For cones and conical frustrums
+const float   DEFAULT_SCALE_TOP_RADIUS =    1.0; ///< For conical frustums
+const float   DEFAULT_SCALE_BOTTOM_RADIUS = 1.5; ///< For cones and conical frustums
 const float   DEFAULT_SCALE_HEIGHT =        3.0; ///< For all conics
 const float   DEFAULT_SCALE_RADIUS =        1.0; ///< For cylinders
 const float   DEFAULT_BEVEL_PERCENTAGE =    0.0; ///< For bevelled cubes
@@ -90,11 +91,12 @@ const float MAX_SMOOTHNESS =       1.0; ///< Maximum bevel smoothness for bevell
 //Specific shape labels.
 const char * const SPHERE_LABEL( "SPHERE" );
 const char * const CONE_LABEL( "CONE" );
-const char * const CONICAL_FRUSTRUM_LABEL( "CONICAL_FRUSTRUM" );
+const char * const CONICAL_FRUSTRUM_LABEL( "CONICAL_FRUSTRUM" ); // deprecated
 const char * const CYLINDER_LABEL( "CYLINDER" );
 const char * const CUBE_LABEL( "CUBE" );
 const char * const OCTAHEDRON_LABEL( "OCTAHEDRON" );
 const char * const BEVELLED_CUBE_LABEL( "BEVELLED_CUBE" );
+const char * const CONICAL_FRUSTUM_LABEL( "CONICAL_FRUSTUM" );
 
 //Shader properties
 const char * const OBJECT_MATRIX_UNIFORM_NAME( "uObjectMatrix" );
@@ -167,10 +169,9 @@ const char* FRAGMENT_SHADER = DALI_COMPOSE_SHADER(
   varying   mediump vec3  vIllumination;\n
   uniform   lowp    vec4  uColor;\n
   uniform   lowp    vec3  mixColor;\n
-  uniform   lowp    float opacity;\n
   void main()\n
   {\n
-      vec4 baseColor = vec4(mixColor, opacity) * uColor;\n
+      vec4 baseColor = vec4(mixColor, 1.0) * uColor;\n
     gl_FragColor = vec4( vIllumination.rgb * baseColor.rgb, baseColor.a );\n
   }\n
 );
@@ -515,7 +516,7 @@ void PrimitiveVisual::CreateGeometry()
       CreateConic( vertices, indices, 0, mScaleBottomRadius, mScaleHeight, mSlices );
       break;
     }
-    case Toolkit::PrimitiveVisual::Shape::CONICAL_FRUSTRUM:
+    case Toolkit::PrimitiveVisual::Shape::CONICAL_FRUSTRUM: // deprecated
     {
       CreateConic( vertices, indices, mScaleTopRadius, mScaleBottomRadius, mScaleHeight, mSlices );
       break;
@@ -543,6 +544,11 @@ void PrimitiveVisual::CreateGeometry()
       CreateBevelledCube( vertices, indices, mScaleDimensions, mBevelPercentage, mBevelSmoothness );
       break;
     }
+    case Toolkit::PrimitiveVisual::Shape::CONICAL_FRUSTUM:
+    {
+      CreateConic( vertices, indices, mScaleTopRadius, mScaleBottomRadius, mScaleHeight, mSlices );
+      break;
+    }
   }
 
   mGeometry = Geometry::New();
index 677df9d..6b38bd7 100644 (file)
@@ -79,11 +79,11 @@ typedef IntrusivePtr< PrimitiveVisual > PrimitiveVisualPtr;
  * | %Property Name    | Type        | Shapes Affected                          |
  * |-------------------|-------------|------------------------------------------|
  * | shapeColor        | VECTOR4     | all                                      |
- * | slices            | INTEGER     | sphere, cone, conical frustrum, cylinder |
+ * | slices            | INTEGER     | sphere, cone, conical frustum, cylinder  |
  * | stacks            | INTEGER     | sphere                                   |
- * | scaleTopRadius    | FLOAT       | conical frustrum                         |
- * | scaleBottomRadius | FLOAT       | cone, conical frustrum                   |
- * | scaleHeight       | FLOAT       | cone, conical frustrum, cylinder         |
+ * | scaleTopRadius    | FLOAT       | conical frustum                          |
+ * | scaleBottomRadius | FLOAT       | cone, conical frustum                    |
+ * | scaleHeight       | FLOAT       | cone, conical frustum, cylinder          |
  * | scaleRadius       | FLOAT       | cylinder                                 |
  * | scaleDimensions   | VECTOR3     | cube, octahedron, bevelled cube          |
  * | bevelPercentage   | FLOAT       | bevelled cube                            |
index 2c8121b..eb2dc04 100755 (executable)
@@ -20,6 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/animation/constraints.h>
+#include <dali/devel-api/rendering/renderer-devel.h>
 #include <dali/devel-api/text-abstraction/text-abstraction-definitions.h>
 
 // INTERNAL HEADER
@@ -61,6 +62,7 @@ const char * const ENABLE_MARKUP_PROPERTY( "enableMarkup" );
 const char * const SHADOW_PROPERTY( "shadow" );
 const char * const UNDERLINE_PROPERTY( "underline" );
 const char * const OUTLINE_PROPERTY( "outline" );
+const char * const BACKGROUND_PROPERTY( "textBackground" );
 
 const Vector4 FULL_TEXTURE_RECT( 0.f, 0.f, 1.f, 1.f );
 
@@ -105,48 +107,32 @@ const char* FRAGMENT_SHADER_SINGLE_COLOR_TEXT = DALI_COMPOSE_SHADER(
   varying mediump vec2 vTexCoord;\n
   uniform sampler2D sTexture;\n
   uniform lowp vec4 uTextColorAnimatable;\n
-  uniform mediump vec4 uAtlasRect;\n
   uniform lowp vec4 uColor;\n
   uniform lowp vec3 mixColor;\n
-  uniform lowp float opacity;\n
   uniform lowp float preMultipliedAlpha;\n
   \n
-  lowp vec4 visualMixColor()\n
-  {\n
-    return vec4( mixColor * mix( 1.0, opacity, preMultipliedAlpha ), opacity );\n
-  }\n
-  \n
   void main()\n
   {\n
-    mediump vec2 texCoord = clamp( mix( uAtlasRect.xy, uAtlasRect.zw, vTexCoord ), uAtlasRect.xy, uAtlasRect.zw );\n
-    mediump float textTexture = texture2D( sTexture, texCoord ).r;\n
+    mediump float textTexture = texture2D( sTexture, vTexCoord ).r;\n
 
     // Set the color of the text to what it is animated to.
-    gl_FragColor = uTextColorAnimatable * textTexture * uColor * visualMixColor();
+    gl_FragColor = uTextColorAnimatable * textTexture * uColor * vec4( mixColor, 1.0 );
   }\n
 );
 
 const char* FRAGMENT_SHADER_MULTI_COLOR_TEXT = DALI_COMPOSE_SHADER(
   varying mediump vec2 vTexCoord;\n
   uniform sampler2D sTexture;\n
-  uniform mediump vec4 uAtlasRect;\n
   uniform lowp vec4 uColor;\n
   uniform lowp vec3 mixColor;\n
-  uniform lowp float opacity;\n
   uniform lowp float preMultipliedAlpha;\n
   \n
-  lowp vec4 visualMixColor()\n
-  {\n
-    return vec4( mixColor * mix( 1.0, opacity, preMultipliedAlpha ), opacity );\n
-  }\n
-  \n
   void main()\n
   {\n
-    mediump vec2 texCoord = clamp( mix( uAtlasRect.xy, uAtlasRect.zw, vTexCoord ), uAtlasRect.xy, uAtlasRect.zw );\n
-    mediump vec4 textTexture = texture2D( sTexture, texCoord );\n
+    mediump vec4 textTexture = texture2D( sTexture, vTexCoord );\n
     textTexture.rgb *= mix( 1.0, textTexture.a, preMultipliedAlpha );\n
 
-    gl_FragColor = textTexture * uColor * visualMixColor();
+    gl_FragColor = textTexture * uColor * vec4( mixColor, 1.0 );
   }\n
 );
 
@@ -155,25 +141,17 @@ const char* FRAGMENT_SHADER_SINGLE_COLOR_TEXT_WITH_STYLE = DALI_COMPOSE_SHADER(
   uniform sampler2D sTexture;\n
   uniform sampler2D sStyle;\n
   uniform lowp vec4 uTextColorAnimatable;\n
-  uniform mediump vec4 uAtlasRect;\n
   uniform lowp vec4 uColor;\n
   uniform lowp vec3 mixColor;\n
-  uniform lowp float opacity;\n
   uniform lowp float preMultipliedAlpha;\n
   \n
-  lowp vec4 visualMixColor()\n
-  {\n
-    return vec4( mixColor * mix( 1.0, opacity, preMultipliedAlpha ), opacity );\n
-  }\n
-  \n
   void main()\n
   {\n
-    mediump vec2 texCoord = clamp( mix( uAtlasRect.xy, uAtlasRect.zw, vTexCoord ), uAtlasRect.xy, uAtlasRect.zw );\n
-    mediump float textTexture = texture2D( sTexture, texCoord ).r;\n
-    mediump vec4 styleTexture = texture2D( sStyle, texCoord );\n
+    mediump float textTexture = texture2D( sTexture, vTexCoord ).r;\n
+    mediump vec4 styleTexture = texture2D( sStyle, vTexCoord );\n
 
     // Draw the text as overlay above the style
-    gl_FragColor = ( uTextColorAnimatable * textTexture + styleTexture * ( 1.0 - textTexture ) ) * uColor * visualMixColor();\n
+    gl_FragColor = ( uTextColorAnimatable * textTexture + styleTexture * ( 1.0 - uTextColorAnimatable.a * textTexture ) ) * uColor * vec4( mixColor, 1.0 );\n
   }\n
 );
 
@@ -181,26 +159,18 @@ const char* FRAGMENT_SHADER_MULTI_COLOR_TEXT_WITH_STYLE = DALI_COMPOSE_SHADER(
   varying mediump vec2 vTexCoord;\n
   uniform sampler2D sTexture;\n
   uniform sampler2D sStyle;\n
-  uniform mediump vec4 uAtlasRect;\n
   uniform lowp vec4 uColor;\n
   uniform lowp vec3 mixColor;\n
-  uniform lowp float opacity;\n
   uniform lowp float preMultipliedAlpha;\n
   \n
-  lowp vec4 visualMixColor()\n
-  {\n
-    return vec4( mixColor * mix( 1.0, opacity, preMultipliedAlpha ), opacity );\n
-  }\n
-  \n
   void main()\n
   {\n
-    mediump vec2 texCoord = clamp( mix( uAtlasRect.xy, uAtlasRect.zw, vTexCoord ), uAtlasRect.xy, uAtlasRect.zw );\n
-    mediump vec4 textTexture = texture2D( sTexture, texCoord );\n
-    mediump vec4 styleTexture = texture2D( sStyle, texCoord );\n
+    mediump vec4 textTexture = texture2D( sTexture, vTexCoord );\n
+    mediump vec4 styleTexture = texture2D( sStyle, vTexCoord );\n
     textTexture.rgb *= mix( 1.0, textTexture.a, preMultipliedAlpha );\n
 
     // Draw the text as overlay above the style
-    gl_FragColor = ( textTexture + styleTexture * ( 1.0 - textTexture.a ) ) * uColor * visualMixColor();\n
+    gl_FragColor = ( textTexture + styleTexture * ( 1.0 - textTexture.a ) ) * uColor * vec4( mixColor, 1.0 );\n
   }\n
 );
 
@@ -209,22 +179,14 @@ const char* FRAGMENT_SHADER_SINGLE_COLOR_TEXT_WITH_EMOJI = DALI_COMPOSE_SHADER(
   uniform sampler2D sTexture;\n
   uniform sampler2D sMask;\n
   uniform lowp vec4 uTextColorAnimatable;\n
-  uniform mediump vec4 uAtlasRect;\n
   uniform lowp vec4 uColor;\n
   uniform lowp vec3 mixColor;\n
-  uniform lowp float opacity;\n
   uniform lowp float preMultipliedAlpha;\n
   \n
-  lowp vec4 visualMixColor()\n
-  {\n
-    return vec4( mixColor * mix( 1.0, opacity, preMultipliedAlpha ), opacity );\n
-  }\n
-  \n
   void main()\n
   {\n
-    mediump vec2 texCoord = clamp( mix( uAtlasRect.xy, uAtlasRect.zw, vTexCoord ), uAtlasRect.xy, uAtlasRect.zw );\n
-    mediump vec4 textTexture = texture2D( sTexture, texCoord );\n
-    mediump float maskTexture = texture2D( sMask, texCoord ).r;\n
+    mediump vec4 textTexture = texture2D( sTexture, vTexCoord );\n
+    mediump float maskTexture = texture2D( sMask, vTexCoord ).r;\n
 
     // Set the color of non-transparent pixel in text to what it is animated to.
     // Markup text with multiple text colors are not animated (but can be supported later on if required).
@@ -233,7 +195,7 @@ const char* FRAGMENT_SHADER_SINGLE_COLOR_TEXT_WITH_EMOJI = DALI_COMPOSE_SHADER(
     textTexture.rgb = mix( textTexture.rgb, uTextColorAnimatable.rgb, vstep * maskTexture ) * mix( 1.0, textTexture.a, preMultipliedAlpha );\n
 
     // Draw the text as overlay above the style
-    gl_FragColor = textTexture * uColor * visualMixColor();\n
+    gl_FragColor = textTexture * uColor * vec4( mixColor, 1.0 );\n
   }\n
 );
 
@@ -244,23 +206,15 @@ const char* FRAGMENT_SHADER_SINGLE_COLOR_TEXT_WITH_STYLE_AND_EMOJI = DALI_COMPOS
   uniform sampler2D sMask;\n
   uniform lowp float uHasMultipleTextColors;\n
   uniform lowp vec4 uTextColorAnimatable;\n
-  uniform mediump vec4 uAtlasRect;\n
   uniform lowp vec4 uColor;\n
   uniform lowp vec3 mixColor;\n
-  uniform lowp float opacity;\n
   uniform lowp float preMultipliedAlpha;\n
   \n
-  lowp vec4 visualMixColor()\n
-  {\n
-    return vec4( mixColor * mix( 1.0, opacity, preMultipliedAlpha ), opacity );\n
-  }\n
-  \n
   void main()\n
   {\n
-    mediump vec2 texCoord = clamp( mix( uAtlasRect.xy, uAtlasRect.zw, vTexCoord ), uAtlasRect.xy, uAtlasRect.zw );\n
-    mediump vec4 textTexture = texture2D( sTexture, texCoord );\n
-    mediump vec4 styleTexture = texture2D( sStyle, texCoord );\n
-    mediump float maskTexture = texture2D( sMask, texCoord ).r;\n
+    mediump vec4 textTexture = texture2D( sTexture, vTexCoord );\n
+    mediump vec4 styleTexture = texture2D( sStyle, vTexCoord );\n
+    mediump float maskTexture = texture2D( sMask, vTexCoord ).r;\n
 
     // Set the color of non-transparent pixel in text to what it is animated to.
     // Markup text with multiple text colors are not animated (but can be supported later on if required).
@@ -269,7 +223,7 @@ const char* FRAGMENT_SHADER_SINGLE_COLOR_TEXT_WITH_STYLE_AND_EMOJI = DALI_COMPOS
     textTexture.rgb = mix( textTexture.rgb, uTextColorAnimatable.rgb, vstep * maskTexture * ( 1.0 - uHasMultipleTextColors ) ) * mix( 1.0, textTexture.a, preMultipliedAlpha );\n
 
     // Draw the text as overlay above the style
-    gl_FragColor = ( textTexture + styleTexture * ( 1.0 - textTexture.a ) ) * uColor * visualMixColor();\n
+    gl_FragColor = ( textTexture + styleTexture * ( 1.0 - textTexture.a ) ) * uColor * vec4( mixColor, 1.0 );\n
   }\n
 );
 
@@ -335,10 +289,28 @@ Dali::Property::Index StringKeyToIndexKey( const std::string& stringKey )
   {
     result = Toolkit::DevelTextVisual::Property::OUTLINE;
   }
+  else if( stringKey == BACKGROUND_PROPERTY )
+  {
+    result = Toolkit::DevelTextVisual::Property::BACKGROUND;
+  }
 
   return result;
 }
 
+void TextColorConstraint( Vector4& current, const PropertyInputContainer& inputs )
+{
+  Vector4 color = inputs[0]->GetVector4();
+  current.r = color.r * color.a;
+  current.g = color.g * color.a;
+  current.b = color.b * color.a;
+  current.a = color.a;
+}
+
+void OpacityConstraint( float& current, const PropertyInputContainer& inputs )
+{
+  current = inputs[0]->GetVector4().a;
+}
+
 } // unnamed namespace
 
 TextVisualPtr TextVisual::New( VisualFactoryCache& factoryCache, const Property::Map& properties )
@@ -415,6 +387,9 @@ void TextVisual::DoCreatePropertyMap( Property::Map& map ) const
 
   GetOutlineProperties( mController, value, Text::EffectStyle::DEFAULT );
   map.Insert( Toolkit::DevelTextVisual::Property::OUTLINE, value );
+
+  GetBackgroundProperties( mController, value, Text::EffectStyle::DEFAULT );
+  map.Insert( Toolkit::DevelTextVisual::Property::BACKGROUND, value );
 }
 
 void TextVisual::DoCreateInstancePropertyMap( Property::Map& map ) const
@@ -487,9 +462,13 @@ void TextVisual::DoSetOnStage( Actor& actor )
     // Create constraint for the animatable text's color Property with uTextColorAnimatable in the renderer.
     if( shaderTextColorIndex != Property::INVALID_INDEX )
     {
-      Constraint constraint = Constraint::New<Vector4>( mImpl->mRenderer, shaderTextColorIndex, EqualToConstraint() );
-      constraint.AddSource( Source( actor, mAnimatableTextColorPropertyIndex ) );
-      constraint.Apply();
+      Constraint colorConstraint = Constraint::New<Vector4>( mImpl->mRenderer, shaderTextColorIndex, TextColorConstraint );
+      colorConstraint.AddSource( Source( actor, mAnimatableTextColorPropertyIndex ) );
+      colorConstraint.Apply();
+
+      Constraint opacityConstraint = Constraint::New< float >( mImpl->mRenderer, Dali::DevelRenderer::Property::OPACITY, OpacityConstraint );
+      opacityConstraint.AddSource( Source( actor, mAnimatableTextColorPropertyIndex ) );
+      opacityConstraint.Apply();
     }
   }
 
@@ -608,6 +587,11 @@ void TextVisual::DoSetProperty( Dali::Property::Index index, const Dali::Propert
       SetOutlineProperties( mController, propertyValue, Text::EffectStyle::DEFAULT );
       break;
     }
+    case Toolkit::DevelTextVisual::Property::BACKGROUND:
+    {
+      SetBackgroundProperties( mController, propertyValue, Text::EffectStyle::DEFAULT );
+      break;
+    }
   }
 }
 
@@ -672,17 +656,21 @@ void TextVisual::UpdateRenderer()
       const Vector4* const colorsBuffer = mController->GetTextModel()->GetColors();
       bool hasMultipleTextColors = ( NULL != colorsBuffer );
 
-      // Check whether the text contains any emoji
-      bool containsEmoji = false;
+      // Check whether the text contains any color glyph
+      bool containsColorGlyph = false;
 
-      Text::ScriptRunIndex numberOfScripts = mController->GetTextModel()->GetNumberOfScripts();
-      const Text::ScriptRun* scripts = mController->GetTextModel()->GetScriptRuns();
-      for ( Text::ScriptRunIndex scriptIndex = 0u; scriptIndex < numberOfScripts; scriptIndex++ )
+      TextAbstraction::FontClient fontClient = TextAbstraction::FontClient::Get();
+      const Text::GlyphInfo* const glyphsBuffer = mController->GetTextModel()->GetGlyphs();
+      const Text::Length numberOfGlyphs = mController->GetTextModel()->GetNumberOfGlyphs();
+      for ( Text::Length glyphIndex = 0; glyphIndex < numberOfGlyphs; glyphIndex++ )
       {
-        const Text::ScriptRun& scriptRun = *( scripts + scriptIndex );
-        if( TextAbstraction::EMOJI == scriptRun.script )
+        // Retrieve the glyph's info.
+        const Text::GlyphInfo* const glyphInfo = glyphsBuffer + glyphIndex;
+
+        // Whether the current glyph is a color one.
+        if( fontClient.IsColorGlyph( glyphInfo->fontId, glyphInfo->index ) )
         {
-          containsEmoji = true;
+          containsColorGlyph = true;
           break;
         }
       }
@@ -698,19 +686,18 @@ void TextVisual::UpdateRenderer()
 
       const bool underlineEnabled = mController->GetTextModel()->IsUnderlineEnabled();
       const bool outlineEnabled = ( mController->GetTextModel()->GetOutlineWidth() > Math::MACHINE_EPSILON_1 );
+      const bool backgroundEnabled = mController->GetTextModel()->IsBackgroundEnabled();;
 
-      const bool styleEnabled = ( shadowEnabled || underlineEnabled || outlineEnabled );
+      const bool styleEnabled = ( shadowEnabled || underlineEnabled || outlineEnabled || backgroundEnabled );
 
-      TextureSet textureSet = GetTextTexture( relayoutSize, hasMultipleTextColors, containsEmoji, styleEnabled );
+      TextureSet textureSet = GetTextTexture( relayoutSize, hasMultipleTextColors, containsColorGlyph, styleEnabled );
       mImpl->mRenderer.SetTextures( textureSet );
 
-      Shader shader = GetTextShader( mFactoryCache, hasMultipleTextColors, containsEmoji, styleEnabled );
+      Shader shader = GetTextShader( mFactoryCache, hasMultipleTextColors, containsColorGlyph, styleEnabled );
       mImpl->mRenderer.SetShader(shader);
 
       mImpl->mFlags &= ~Impl::IS_ATLASING_APPLIED;
 
-      Vector4 atlasRect = FULL_TEXTURE_RECT;
-      mImpl->mRenderer.RegisterProperty( ATLAS_RECT_UNIFORM_NAME, atlasRect );
       mImpl->mRenderer.RegisterProperty( "uHasMultipleTextColors", static_cast<float>( hasMultipleTextColors ) );
 
       mImpl->mRenderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON);
@@ -745,7 +732,7 @@ void TextVisual::RemoveTextureSet()
   }
 }
 
-TextureSet TextVisual::GetTextTexture( const Vector2& size, bool hasMultipleTextColors, bool containsEmoji, bool styleEnabled )
+TextureSet TextVisual::GetTextTexture( const Vector2& size, bool hasMultipleTextColors, bool containsColorGlyph, bool styleEnabled )
 {
   // Filter mode needs to be set to linear to produce better quality while scaling.
   Sampler sampler = Sampler::New();
@@ -754,7 +741,7 @@ TextureSet TextVisual::GetTextTexture( const Vector2& size, bool hasMultipleText
   TextureSet textureSet = TextureSet::New();
 
   // Create RGBA texture if the text contains emojis or multiple text colors, otherwise L8 texture
-  Pixel::Format textPixelFormat = ( containsEmoji || hasMultipleTextColors ) ? Pixel::RGBA8888 : Pixel::L8;
+  Pixel::Format textPixelFormat = ( containsColorGlyph || hasMultipleTextColors ) ? Pixel::RGBA8888 : Pixel::L8;
 
   // Check the text direction
   Toolkit::DevelText::TextDirection::Type textDirection = mController->GetTextDirection();
@@ -791,7 +778,7 @@ TextureSet TextVisual::GetTextTexture( const Vector2& size, bool hasMultipleText
     textureSet.SetSampler( 1u, sampler );
   }
 
-  if ( containsEmoji && !hasMultipleTextColors )
+  if ( containsColorGlyph && !hasMultipleTextColors )
   {
     // Create a L8 texture as a mask to avoid color glyphs (e.g. emojis) to be affected by text color animation
     PixelData maskData = mTypesetter->Render( size, textDirection, Text::Typesetter::RENDER_MASK, false, Pixel::L8 );
@@ -818,7 +805,7 @@ TextureSet TextVisual::GetTextTexture( const Vector2& size, bool hasMultipleText
   return textureSet;
 }
 
-Shader TextVisual::GetTextShader( VisualFactoryCache& factoryCache, bool hasMultipleTextColors, bool containsEmoji, bool styleEnabled )
+Shader TextVisual::GetTextShader( VisualFactoryCache& factoryCache, bool hasMultipleTextColors, bool containsColorGlyph, bool styleEnabled )
 {
   Shader shader;
 
@@ -844,7 +831,7 @@ Shader TextVisual::GetTextShader( VisualFactoryCache& factoryCache, bool hasMult
       factoryCache.SaveShader( VisualFactoryCache::TEXT_SHADER_MULTI_COLOR_TEXT_WITH_STYLE, shader );
     }
   }
-  else if( !hasMultipleTextColors && !containsEmoji && !styleEnabled )
+  else if( !hasMultipleTextColors && !containsColorGlyph && !styleEnabled )
   {
     shader = factoryCache.GetShader( VisualFactoryCache::TEXT_SHADER_SINGLE_COLOR_TEXT );
     if( !shader )
@@ -854,7 +841,7 @@ Shader TextVisual::GetTextShader( VisualFactoryCache& factoryCache, bool hasMult
       factoryCache.SaveShader( VisualFactoryCache::TEXT_SHADER_SINGLE_COLOR_TEXT, shader );
     }
   }
-  else if( !hasMultipleTextColors && !containsEmoji && styleEnabled )
+  else if( !hasMultipleTextColors && !containsColorGlyph && styleEnabled )
   {
     shader = factoryCache.GetShader( VisualFactoryCache::TEXT_SHADER_SINGLE_COLOR_TEXT_WITH_STYLE );
     if( !shader )
@@ -864,7 +851,7 @@ Shader TextVisual::GetTextShader( VisualFactoryCache& factoryCache, bool hasMult
       factoryCache.SaveShader( VisualFactoryCache::TEXT_SHADER_SINGLE_COLOR_TEXT_WITH_STYLE, shader );
     }
   }
-  else if( !hasMultipleTextColors && containsEmoji && !styleEnabled )
+  else if( !hasMultipleTextColors && containsColorGlyph && !styleEnabled )
   {
     shader = factoryCache.GetShader( VisualFactoryCache::TEXT_SHADER_SINGLE_COLOR_TEXT_WITH_EMOJI );
     if( !shader )
@@ -874,7 +861,7 @@ Shader TextVisual::GetTextShader( VisualFactoryCache& factoryCache, bool hasMult
       factoryCache.SaveShader( VisualFactoryCache::TEXT_SHADER_SINGLE_COLOR_TEXT_WITH_EMOJI, shader );
     }
   }
-  else // if( !hasMultipleTextColors && containsEmoji && styleEnabled )
+  else // if( !hasMultipleTextColors && containsColorGlyph && styleEnabled )
   {
     shader = factoryCache.GetShader( VisualFactoryCache::TEXT_SHADER_SINGLE_COLOR_TEXT_WITH_STYLE_AND_EMOJI );
     if( !shader )
index 765b9bf..6fbf8ed 100644 (file)
@@ -205,19 +205,19 @@ private:
    * Get the texture of the text for rendering.
    * @param[in] size The texture size.
    * @param[in] hasMultipleTextColors Whether the text contains multiple colors.
-   * @param[in] containsEmoji Whether the text contains emoji.
+   * @param[in] containsColorGlyph Whether the text contains color glyph.
    * @param[in] styleEnabled Whether the text contains any styles (e.g. shadow, underline, etc.).
    */
-  TextureSet GetTextTexture( const Vector2& size, bool hasMultipleTextColors, bool containsEmoji, bool styleEnabled );
+  TextureSet GetTextTexture( const Vector2& size, bool hasMultipleTextColors, bool containsColorGlyph, bool styleEnabled );
 
   /**
    * Get the text rendering shader.
    * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object
    * @param[in] hasMultipleTextColors Whether the text contains multiple colors.
-   * @param[in] containsEmoji Whether the text contains emoji.
+   * @param[in] containsColorGlyph Whether the text contains color glyph.
    * @param[in] styleEnabled Whether the text contains any styles (e.g. shadow, underline, etc.).
    */
-  Shader GetTextShader( VisualFactoryCache& factoryCache, bool hasMultipleTextColors, bool containsEmoji, bool styleEnabled );
+  Shader GetTextShader( VisualFactoryCache& factoryCache, bool hasMultipleTextColors, bool containsColorGlyph, bool styleEnabled );
 
   /**
    * @brief Retrieve the text's controller.
index a12fae0..1ec606c 100644 (file)
@@ -120,6 +120,14 @@ TextureManager::TextureManager()
 {
 }
 
+TextureManager::~TextureManager()
+{
+  for( auto iter = mLifecycleObservers.Begin(), endIter = mLifecycleObservers.End(); iter != endIter; ++iter)
+  {
+    (*iter)->TextureManagerDestroyed();
+  }
+}
+
 TextureSet TextureManager::LoadTexture(
     const VisualUrl& url, Dali::ImageDimensions desiredSize, Dali::FittingMode::Type fittingMode,
     Dali::SamplingMode::Type samplingMode, const MaskingDataPointer& maskInfo,
@@ -466,13 +474,20 @@ void TextureManager::Remove( const TextureManager::TextureId textureId )
   }
 }
 
-const VisualUrl& TextureManager::GetVisualUrl( TextureId textureId )
+VisualUrl TextureManager::GetVisualUrl( TextureId textureId )
 {
+  VisualUrl visualUrl("");
   int cacheIndex = GetCacheIndexFromId( textureId );
-  DALI_ASSERT_DEBUG( cacheIndex != INVALID_CACHE_INDEX && "TextureId out of range");
 
-  TextureInfo& cachedTextureInfo( mTextureInfoContainer[ cacheIndex ] );
-  return cachedTextureInfo.url;
+  if( cacheIndex != INVALID_CACHE_INDEX )
+  {
+    DALI_LOG_INFO( gTextureManagerLogFilter, Debug::Concise, "TextureManager::GetVisualUrl. Using cached texture id=%d, textureId=%d\n",
+                   cacheIndex, textureId );
+
+    TextureInfo& cachedTextureInfo( mTextureInfoContainer[ cacheIndex ] );
+    visualUrl = cachedTextureInfo.url;
+  }
+  return visualUrl;
 }
 
 TextureManager::LoadState TextureManager::GetTextureState( TextureId textureId )
@@ -574,6 +589,31 @@ TextureSet TextureManager::RemoveExternalTexture( const std::string& url )
   return TextureSet();
 }
 
+
+void TextureManager::AddObserver( TextureManager::LifecycleObserver& observer )
+{
+  // make sure an observer doesn't observe the same object twice
+  // otherwise it will get multiple calls to ObjectDestroyed()
+  DALI_ASSERT_DEBUG( mLifecycleObservers.End() == std::find( mLifecycleObservers.Begin(), mLifecycleObservers.End(), &observer));
+  mLifecycleObservers.PushBack( &observer );
+}
+
+void TextureManager::RemoveObserver( TextureManager::LifecycleObserver& observer)
+{
+  // Find the observer...
+  auto endIter =  mLifecycleObservers.End();
+  for( auto iter = mLifecycleObservers.Begin(); iter != endIter; ++iter)
+  {
+    if( (*iter) == &observer)
+    {
+      mLifecycleObservers.Erase( iter );
+      break;
+    }
+  }
+  DALI_ASSERT_DEBUG(endIter != mLifecycleObservers.End());
+}
+
+
 bool TextureManager::LoadTexture( TextureInfo& textureInfo )
 {
   bool success = true;
@@ -730,8 +770,11 @@ void TextureManager::ApplyMask(
   float contentScale, bool cropToMask )
 {
   int maskCacheIndex = GetCacheIndexFromId( maskTextureId );
-  Devel::PixelBuffer maskPixelBuffer = mTextureInfoContainer[maskCacheIndex].pixelBuffer;
-  pixelBuffer.ApplyMask( maskPixelBuffer, contentScale, cropToMask );
+  if( maskCacheIndex != INVALID_CACHE_INDEX )
+  {
+    Devel::PixelBuffer maskPixelBuffer = mTextureInfoContainer[maskCacheIndex].pixelBuffer;
+    pixelBuffer.ApplyMask( maskPixelBuffer, contentScale, cropToMask );
+  }
 }
 
 
index 5b6a98e..b8c6ab8 100644 (file)
@@ -136,6 +136,18 @@ public:
   };
   using MaskingDataPointer = std::unique_ptr<MaskingData>;
 
+
+  /**
+   * Class to provide lifecycle event on destruction of texture manager.
+   */
+  struct LifecycleObserver
+  {
+    /**
+     * Called shortly before the texture manager is destroyed.
+     */
+    virtual void TextureManagerDestroyed() = 0;
+  };
+
   /**
    * Constructor.
    */
@@ -144,8 +156,7 @@ public:
   /**
    * Destructor.
    */
-  ~TextureManager() = default;
-
+  ~TextureManager();
 
   // TextureManager Main API:
 
@@ -296,9 +307,11 @@ public:
   void Remove( const TextureManager::TextureId textureId );
 
   /**
-   * Get the visualUrl associated with the texture id
+   * @brief Get the visualUrl associated with the texture id.
+   * @param[in] textureId The texture Id to get
+   * @return The visual Url associated with the texture id.
    */
-  const VisualUrl& GetVisualUrl( TextureId textureId );
+  VisualUrl GetVisualUrl( TextureId textureId );
 
   /**
    * @brief Get the current state of a texture
@@ -329,6 +342,19 @@ public:
    */
   TextureSet RemoveExternalTexture( const std::string& url );
 
+  /**
+   * Add an observer to the object.
+   * @param[in] observer The observer to add.
+   */
+  void AddObserver( TextureManager::LifecycleObserver& observer );
+
+  /**
+   * Remove an observer from the object
+   * @pre The observer has already been added.
+   * @param[in] observer The observer to remove.
+   */
+  void RemoveObserver( TextureManager::LifecycleObserver& observer );
+
 private:
 
   /**
@@ -710,6 +736,7 @@ private:  // Member Variables:
   RoundRobinContainerView< AsyncLoadingHelper > mAsyncLocalLoaders;    ///< The Asynchronous image loaders used to provide all local async loads
   RoundRobinContainerView< AsyncLoadingHelper > mAsyncRemoteLoaders;   ///< The Asynchronous image loaders used to provide all remote async loads
   std::vector< ExternalTextureInfo >            mExternalTextures;     ///< Externally provided textures
+  Dali::Vector<LifecycleObserver*>              mLifecycleObservers;   ///< Lifecycle observers of texture manager
   TextureId                                     mCurrentTextureId;     ///< The current value used for the unique Texture Id generation
 };
 
index b6f75ee..90dcd32 100644 (file)
@@ -123,7 +123,6 @@ Internal::Visual::Base::Impl::Impl(FittingMode fittingMode)
   mControlSize( Vector2::ZERO ),
   mDepthIndex( 0.0f ),
   mMixColorIndex( Property::INVALID_INDEX ),
-  mOpacityIndex( Property::INVALID_INDEX ),
   mFittingMode( fittingMode ),
   mFlags( 0 ),
   mResourceStatus( Toolkit::Visual::ResourceStatus::PREPARING )
index 3ce75aa..1f59ec0 100644 (file)
@@ -126,7 +126,6 @@ struct Base::Impl
   Size            mControlSize;
   int             mDepthIndex;
   Property::Index mMixColorIndex;
-  Property::Index mOpacityIndex;
   FittingMode     mFittingMode;  //< How the contents should fit the view
   int             mFlags;
   Toolkit::Visual::ResourceStatus  mResourceStatus;
index 8389fc0..05a318b 100755 (executable)
@@ -22,6 +22,7 @@
 #include <dali/public-api/common/dali-common.h>
 #include <dali/devel-api/object/handle-devel.h>
 #include <dali/devel-api/scripting/enum-helper.h>
+#include <dali/devel-api/rendering/renderer-devel.h>
 #include <dali/integration-api/debug.h>
 
 //INTERNAL HEARDER
@@ -291,7 +292,6 @@ void Visual::Base::SetOffStage( Actor& actor )
   {
     DoSetOffStage( actor );
     mImpl->mMixColorIndex = Property::INVALID_INDEX;
-    mImpl->mOpacityIndex = Property::INVALID_INDEX;
     mImpl->mFlags &= ~Impl::IS_ON_STAGE;
   }
 }
@@ -393,14 +393,7 @@ void Visual::Base::RegisterMixColor()
     mImpl->mRenderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON );
   }
 
-  if( mImpl->mOpacityIndex == Property::INVALID_INDEX )
-  {
-    mImpl->mOpacityIndex = DevelHandle::RegisterProperty(
-      mImpl->mRenderer,
-      Toolkit::Visual::Property::OPACITY,
-      OPACITY,
-      mImpl->mMixColor.a );
-  }
+  mImpl->mRenderer.SetProperty( DevelRenderer::Property::OPACITY, mImpl->mMixColor.a );
 
   float preMultipliedAlpha = 0.0f;
   if( IsPreMultipliedAlphaEnabled() )
@@ -417,7 +410,7 @@ void Visual::Base::SetMixColor( const Vector4& color )
   if( mImpl->mRenderer )
   {
     mImpl->mRenderer.SetProperty( mImpl->mMixColorIndex, Vector3(color) );
-    mImpl->mRenderer.SetProperty( mImpl->mOpacityIndex, color.a );
+    mImpl->mRenderer.SetProperty( DevelRenderer::Property::OPACITY, color.a );
     if( color.a < 1.f )
     {
       mImpl->mRenderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON );
@@ -600,27 +593,22 @@ void Visual::Base::AnimateOpacityProperty(
   Dali::Animation& transition,
   Internal::TransitionData::Animator& animator )
 {
-  Property::Index index = mImpl->mOpacityIndex;
-
   bool isOpaque = mImpl->mMixColor.a >= 1.0f;
 
-  if( index != Property::INVALID_INDEX )
+  float initialOpacity;
+  if( animator.initialValue.Get( initialOpacity ) )
   {
-    float initialOpacity;
-    if( animator.initialValue.Get( initialOpacity ) )
-    {
-      isOpaque = (initialOpacity >= 1.0f);
-    }
-
-    float targetOpacity;
-    if( animator.targetValue.Get( targetOpacity ) )
-    {
-      mImpl->mMixColor.a = targetOpacity;
-    }
+    isOpaque = (initialOpacity >= 1.0f);
+  }
 
-    SetupTransition( transition, animator, index, animator.initialValue, animator.targetValue );
-    SetupBlendMode( transition, isOpaque, animator.animate );
+  float targetOpacity;
+  if( animator.targetValue.Get( targetOpacity ) )
+  {
+    mImpl->mMixColor.a = targetOpacity;
   }
+
+  SetupTransition( transition, animator, DevelRenderer::Property::OPACITY, animator.initialValue, animator.targetValue );
+  SetupBlendMode( transition, isOpaque, animator.animate );
 }
 
 void Visual::Base::AnimateRendererProperty(
@@ -699,7 +687,7 @@ void Visual::Base::AnimateMixColorProperty(
     SetupTransition( transition, animator, index, initialMixColor, targetMixColor );
     if( animateOpacity )
     {
-      SetupTransition( transition, animator, mImpl->mOpacityIndex, initialOpacity, targetOpacity );
+      SetupTransition( transition, animator, DevelRenderer::Property::OPACITY, initialOpacity, targetOpacity );
       SetupBlendMode( transition, isOpaque, animator.animate );
     }
   }
index 90bb937..4803e07 100644 (file)
@@ -71,7 +71,8 @@ DALI_TYPE_REGISTRATION_END()
 } // namespace
 
 VisualFactory::VisualFactory( bool debugEnabled )
-: mDebugEnabled( debugEnabled ),
+: mFactoryCache(),
+  mDebugEnabled( debugEnabled ),
   mPreMultiplyOnLoad( true )
 {
 }
index 3319e92..238d4ac 100644 (file)
@@ -69,11 +69,10 @@ void main()\n
 const char* FRAGMENT_SHADER = DALI_COMPOSE_SHADER(\n
   uniform lowp vec4 uColor;\n
   uniform lowp vec3 mixColor;\n
-  uniform lowp float opacity;\n
 \n
 void main()\n
 {\n
-  gl_FragColor = uColor * vec4( mixColor, opacity );\n
+  gl_FragColor = uColor * vec4( mixColor, 1.0 );\n
 }\n
 );
 
index 4a1c148..fe9b11e 100644 (file)
@@ -722,7 +722,7 @@ public:
 
   /**
    * @brief This is emitted when accessibility action is received to focus and read from the
-   * first item on the top continously (by three fingers single tap).
+   * first item on the top continuously (by three fingers single tap).
    *
    * A callback of the following type may be connected:
    * @code
@@ -735,7 +735,7 @@ public:
 
   /**
    * @brief This is emitted when accessibility action is received to move the focus to and
-   * read from the next item continously (by three fingers double tap).
+   * read from the next item continuously (by three fingers double tap).
    *
    * A callback of the following type may be connected:
    * @code
index 0f6f9d9..94ef744 100644 (file)
@@ -220,7 +220,7 @@ public:
     {
       // Event side child properties
       FLEX = CHILD_PROPERTY_START_INDEX,        ///< name "flex",               The proportion of the free space in the container the flex item will receive. If all items in the container set this property, their sizes will be proportional to the specified flex factor,  type FLOAT @SINCE_1_1.35
-      ALIGN_SELF,                               ///< name "alignSelf",          The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container,                          @see FlexContainer::Alignment,     type INTEGER @SINCE_1_1.35
+      ALIGN_SELF,                               ///< name "alignSelf",          The alignment of the flex item along the cross axis, which, if set, overrides the default alignment for all items in the container,                         @see FlexContainer::Alignment,     type INTEGER @SINCE_1_1.35
       FLEX_MARGIN                               ///< name "flexMargin",         The space around the flex item,                                                                                                                                                                type VECTOR4 @SINCE_1_1.35
     };
   };
index 7a0aa1d..e709a58 100644 (file)
@@ -65,6 +65,21 @@ VideoView VideoView::New( const std::string& url )
   return videoView;
 }
 
+VideoView VideoView::New( bool swCodec )
+{
+  VideoView videoView = Internal::VideoView::New();
+  Dali::Toolkit::GetImpl( videoView ).SetSWCodec( swCodec );
+  return videoView;
+}
+
+VideoView VideoView::New( const std::string& url, bool swCodec )
+{
+  VideoView videoView = Internal::VideoView::New();
+  Dali::Toolkit::GetImpl( videoView ).SetUrl( url );
+  Dali::Toolkit::GetImpl( videoView ).SetSWCodec( swCodec );
+  return videoView;
+}
+
 VideoView VideoView::DownCast( BaseHandle handle )
 {
   return Control::DownCast< VideoView, Internal::VideoView >( handle );
old mode 100644 (file)
new mode 100755 (executable)
index 2d0816b..4f0e12e
@@ -84,6 +84,8 @@ public:
       /**
        * @brief name "video", video file url as string type or Property::Map.
        * @SINCE_1_1.38
+       * @REMARK_INTERNET
+       * @REMARK_STORAGE
        */
       VIDEO = PROPERTY_START_INDEX,
 
@@ -113,7 +115,61 @@ public:
        * @SINCE_1_2.62
        * @REMARK_RAWVIDEO
        */
-      UNDERLAY
+      UNDERLAY,
+
+     /**
+       * @brief The play position (millisecond) of the video.
+       * @details Name "playPosition", type Property::INTEGER
+       * @SINCE_1_3_9
+       */
+      PLAY_POSITION,
+
+      /**
+        * @brief The display mode of the video.
+        * @SINCE_1_3_15
+        */
+      DISPLAY_MODE
+    };
+  };
+
+  /**
+   * @brief The values of this enum determine how the video should be display mode to the view
+   * @SINCE_1_3_15
+   */
+  struct DisplayMode
+  {
+    enum Type
+    {
+      /**
+       * @brief Letter box
+       * @SINCE_1_3_15
+       */
+      LETTER_BOX = 0,
+      /**
+       * @brief Origin size
+       * @SINCE_1_3_15
+       */
+      ORIGIN_SIZE,
+      /**
+       * @brief Full-screen
+       * @SINCE_1_3_15
+       */
+      FULL_SCREEN,
+      /**
+       * @brief Cropped full-screen
+       * @SINCE_1_3_15
+       */
+      CROPPED_FULL,
+      /**
+       * @brief  Origin size (if surface size is larger than video size(width/height)) or Letter box (if video size(width/height) is larger than surface size)
+       * @SINCE_1_3_15
+       */
+      ORIGIN_OR_LETTER,
+      /**
+       * @brief  Region of Interest
+       * @SINCE_1_3_15
+       */
+      DST_ROI
     };
   };
 
@@ -124,7 +180,6 @@ public:
    * @SINCE_1_1.38
    * @return A handle to a newly allocated Dali ImageView
    *
-   * @note VideoView will not display anything
    */
   static VideoView New();
 
@@ -141,6 +196,31 @@ public:
   static VideoView New( const std::string& url );
 
   /**
+   * @brief Creates an initialized VideoView.
+   * @SINCE_1_3_9
+   * @param[in] swCodec Video rendering by H/W codec if false
+   * @return A handle to a newly allocated Dali ImageView
+   *
+   * @note If platform or target does not support sw codec, video-view shows an error message and video by default codec type
+   */
+  static VideoView New( bool swCodec );
+
+  /**
+   * @brief Creates an initialized VideoView.
+   * If the string is empty, VideoView will not display anything.
+   *
+   * @SINCE_1_3_9
+   * @REMARK_INTERNET
+   * @REMARK_STORAGE
+   * @param[in] url The url of the video resource to display
+   * @param[in] swCodec Video rendering by H/W codec if false
+   * @return A handle to a newly allocated Dali VideoView
+   *
+   * @note If platform or target does not support sw codec, video-view shows an error message and video by default codec type
+   */
+  static VideoView New( const std::string& url, bool swCodec );
+
+  /**
    * @brief Creates an uninitialized VideoView.
    * @SINCE_1_1.38
    */
index eb5e972..57d0b34 100644 (file)
@@ -31,7 +31,7 @@ namespace Toolkit
 
 const unsigned int TOOLKIT_MAJOR_VERSION = 1;
 const unsigned int TOOLKIT_MINOR_VERSION = 3;
-const unsigned int TOOLKIT_MICRO_VERSION = 9;
+const unsigned int TOOLKIT_MICRO_VERSION = 17;
 const char * const TOOLKIT_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index 30477e8..1e3afcf 100644 (file)
@@ -73,12 +73,12 @@ enum
   /**
    * @brief The number of slices as you go around the shape.
    * @details Name "slices", type Property::INTEGER.
-   * For spheres and conical frustrums, this determines how many divisions there are as you go around the object.
+   * For spheres and conical frustums, this determines how many divisions there are as you go around the object.
    * @SINCE_1_1.45
    * @note Optional. If not specified, the default is 128.
    * @note Applies to:
    *      - Shape::SPHERE
-   *      - Shape::CONICAL_FRUSTRUM
+   *      - Shape::CONICAL_FRUSTUM
    *      - Shape::CONE
    *      - Shape::CYLINDER
    * @note The range is from 1 to 255.
@@ -98,23 +98,23 @@ enum
   STACKS,
 
   /**
-   * @brief The scale of the radius of the top circle of a conical frustrum.
+   * @brief The scale of the radius of the top circle of a conical frustum.
    * @details Name "scaleTopRadius", type Property::FLOAT.
    * @SINCE_1_1.45
    * @note Optional. If not specified, the default is 1.0f.
    * @note Applies to:
-   *      - Shape::CONICAL_FRUSTRUM
+   *      - Shape::CONICAL_FRUSTUM
    * @note Only values greater than or equal to 0.0f are accepted.
    */
   SCALE_TOP_RADIUS,
 
   /**
-   * @brief The scale of the radius of the bottom circle of a conical frustrum.
+   * @brief The scale of the radius of the bottom circle of a conical frustum.
    * @details Name "scaleBottomRadius", type Property::FLOAT.
    * @SINCE_1_1.45
    * @note Optional. If not specified, the default is 1.5f.
    * @note Applies to:
-   *      - Shape::CONICAL_FRUSTRUM
+   *      - Shape::CONICAL_FRUSTUM
    *      - Shape::CONE
    * @note Only values greater than or equal to 0.0f are accepted.
    */
@@ -126,7 +126,7 @@ enum
    * @SINCE_1_1.45
    * @note Optional. If not specified, the default is 3.0f.
    * @note Applies to:
-   *      - Shape::CONICAL_FRUSTRUM
+   *      - Shape::CONICAL_FRUSTUM
    *      - Shape::CONE
    *      - Shape::CYLINDER
    * @note Only values greater than or equal to 0.0f are accepted.
@@ -208,12 +208,13 @@ namespace Shape
 enum Type
 {
   SPHERE, ///< A perfectly round geometrical object in three-dimensional space. @SINCE_1_1.45
-  CONICAL_FRUSTRUM, ///< The area bound between two circles, i.e. a cone with the tip removed. @SINCE_1_1.45
-  CONE, ///< Equivalent to a conical frustrum with top radius of zero. @SINCE_1_1.45
-  CYLINDER, ///< Equivalent to a conical frustrum with equal radii for the top and bottom circles. @SINCE_1_1.45
+  CONICAL_FRUSTRUM, ///< @DEPRECATED_1_3.15, use CONICAL_FRUSTUM instead. The area bound between two circles, i.e. a cone with the tip removed. @SINCE_1_1.45
+  CONE, ///< Equivalent to a conical frustum with top radius of zero. @SINCE_1_1.45
+  CYLINDER, ///< Equivalent to a conical frustum with equal radii for the top and bottom circles. @SINCE_1_1.45
   CUBE, ///< Equivalent to a bevelled cube with a bevel percentage of zero. @SINCE_1_1.45
   OCTAHEDRON, ///< Equivalent to a bevelled cube with a bevel percentage of one. @SINCE_1_1.45
   BEVELLED_CUBE, ///< A cube/cuboid with all edges flattened to some degree. @SINCE_1_1.45
+  CONICAL_FRUSTUM ///< The area bound between two circles, i.e. a cone with the tip removed. @SINCE_1_3.15
 };
 }
 
index 1022a98..603f977 100644 (file)
@@ -2753,14 +2753,21 @@ NSVGimage* nsvgParse(char* input, const char* units, float dpi)
 NSVGimage* nsvgParseFromFile(const char* filename, const char* units, float dpi)
 {
        FILE* fp = NULL;
-       size_t size;
+       size_t size = 0;
+       long value = 0;
        char* data = NULL;
        NSVGimage* image = NULL;
 
        fp = fopen(filename, "rb");
        if (!fp) goto error;
        fseek(fp, 0, SEEK_END);
-       size = ftell(fp);
+       value = ftell(fp);
+       /**
+        * In the original file, unsigned long type 'size' gets a return value. But, the return value of 'ftell()' is
+        * signed long type. To prevent interpreting an unexpected large value, we put the comparitive condition here.
+        */
+       if( value < 0 ) goto error;
+       size = value;
        fseek(fp, 0, SEEK_SET);
        data = (char*)malloc(size+1);
        if (data == NULL) goto error;
index 982583a..bc706fb 100644 (file)
@@ -86,7 +86,7 @@
  * </tr>
  * <tr>
  *    <td style="padding-left:1em">@ref dali_toolkit_controls_image_view</td>
- *    <td>ImageView is a control displying an image.</td>
+ *    <td>ImageView is a control displaying an image.</td>
  * </tr>
  * <tr>
  *    <td style="padding-left:1em">@ref dali_toolkit_controls_scroll_bar</td>
  *     @brief GaussianBlurView provides a render process that blurs an image.
 
  *     @defgroup dali_toolkit_controls_image_view Image View
- *     @brief ImageView is a control displying an image.
+ *     @brief ImageView is a control displaying an image.
 
  *     @defgroup dali_toolkit_controls_scroll_bar Scroll Bar
  *     @brief ScrollBar is a component that can be linked to the scrollable objects.
index af1843c..2de69d6 100644 (file)
@@ -1,6 +1,6 @@
 Name:       dali-toolkit
 Summary:    Dali 3D engine Toolkit
-Version:    1.3.9
+Version:    1.3.17
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT