Remove more ImageActors from Toolkit 83/55083/8
authorXiangyin Ma <x1.ma@samsung.com>
Mon, 21 Dec 2015 18:03:04 +0000 (18:03 +0000)
committerXiangyin Ma <x1.ma@samsung.com>
Mon, 4 Apr 2016 13:13:28 +0000 (14:13 +0100)
Change-Id: Idc4e89e816ed271b71befb22d469912775e2ee16

36 files changed:
automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextEditor.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp
automated-tests/src/dali-toolkit/utc-Dali-ToolBar.cpp
dali-toolkit/devel-api/controls/popup/confirmation-popup.cpp
dali-toolkit/devel-api/controls/shadow-view/shadow-view.h
dali-toolkit/devel-api/shader-effects/motion-blur-effect.h
dali-toolkit/devel-api/shader-effects/motion-stretch-effect.h
dali-toolkit/internal/accessibility-manager/accessibility-manager-impl.cpp
dali-toolkit/internal/controls/bloom-view/bloom-view-impl.h
dali-toolkit/internal/controls/bubble-effect/bubble-emitter-impl.cpp
dali-toolkit/internal/controls/bubble-effect/bubble-emitter-impl.h
dali-toolkit/internal/controls/bubble-effect/color-adjuster.h
dali-toolkit/internal/controls/buttons/button-impl.cpp
dali-toolkit/internal/controls/buttons/push-button-impl.cpp
dali-toolkit/internal/controls/buttons/radio-button-impl.h
dali-toolkit/internal/controls/magnifier/magnifier-impl.h
dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.h
dali-toolkit/internal/controls/popup/confirmation-popup-impl.cpp
dali-toolkit/internal/controls/popup/popup-impl.cpp
dali-toolkit/internal/controls/popup/popup-impl.h
dali-toolkit/internal/controls/slider/slider-impl.h
dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp
dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.h
dali-toolkit/internal/controls/text-controls/text-selection-toolbar-impl.cpp
dali-toolkit/internal/controls/tool-bar/tool-bar-impl.cpp
dali-toolkit/internal/text/clipping/text-clipper.cpp
dali-toolkit/internal/text/clipping/text-clipper.h
dali-toolkit/internal/text/decorator/text-decorator.cpp
dali-toolkit/public-api/accessibility-manager/accessibility-manager.h
dali-toolkit/public-api/controls/buttons/button.cpp
dali-toolkit/public-api/controls/buttons/push-button.cpp
dali-toolkit/public-api/controls/default-controls/solid-color-actor.cpp
dali-toolkit/public-api/controls/default-controls/solid-color-actor.h
dali-toolkit/styles/images-common/B16-8_TTS_focus.9.png [new file with mode: 0644]
dali-toolkit/styles/images-common/B16-8_TTS_focus.png [deleted file]

index 61fba598f0adc1e32ea2a5fd10ecc678ea88f75e..ee941cc7b702a495c16f6bd2f1022fc6b25a037d 100644 (file)
@@ -812,7 +812,7 @@ int UtcDaliToolkitScrollViewSignalsUpdate(void)
   scrollView.ScrollUpdatedSignal().Connect( &OnScrollUpdate );
   scrollView.ScrollCompletedSignal().Connect( &OnScrollComplete );
 
-  ImageActor image = CreateSolidColorActor( Color::RED );
+  Actor image = Actor::New();
   image.SetSize(stageSize);
   image.SetParentOrigin(ParentOrigin::TOP_LEFT);
   image.SetAnchorPoint(AnchorPoint::TOP_LEFT);
index fc49de9dbfb5bfffff0f0c743d521b0f36b46e60..4bb5f5618b8b454dc58b47aa2918b57353350765 100644 (file)
@@ -545,8 +545,7 @@ int utcDaliTextEditorEvent02(void)
   DALI_TEST_EQUALS( offscreenRoot.GetChildCount(), 1u, TEST_LOCATION ); // The camera actor.
 
   Actor offscreenImage = editor.GetChildAt( 2u );
-  ImageActor imageActor = ImageActor::DownCast( offscreenImage );
-  DALI_TEST_CHECK( imageActor );
+  DALI_TEST_CHECK( offscreenImage );
 
   // Create a tap event to touch the text editor.
   application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
index 31e51268a95cc3357bc7f96b05fe6600b7d87bf1..982dffeb848c98dca8bdf92be26b874f8beef14a 100644 (file)
@@ -669,8 +669,7 @@ int utcDaliTextFieldEvent02(void)
   DALI_TEST_EQUALS( offscreenRoot.GetChildCount(), 1u, TEST_LOCATION ); // The camera actor.
 
   Actor offscreenImage = field.GetChildAt( 2u );
-  ImageActor imageActor = ImageActor::DownCast( offscreenImage );
-  DALI_TEST_CHECK( imageActor );
+  DALI_TEST_CHECK( offscreenImage );
 
   // Create a tap event to touch the text field.
   application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
index 36e8f8c4d87b01fca8fd988b119f692a571e5f95..fec79487a437a3ebf8a21401653c81c08bfa9278 100644 (file)
@@ -21,6 +21,7 @@
 #include <dali-toolkit/dali-toolkit.h>
 #include <dali/integration-api/events/touch-event-integ.h>
 #include <dali-toolkit/devel-api/controls/tool-bar/tool-bar.h>
+#include <dali-toolkit/devel-api/controls/renderer-factory/renderer-factory.h>
 
 using namespace Dali;
 using namespace Toolkit;
@@ -33,6 +34,18 @@ static void TestCallback(BaseHandle handle)
 {
   gObjectCreatedCallBackCalled = true;
 }
+
+Actor CreateColorActor( const Vector4& color )
+{
+  Actor solidColorActor = Actor::New();
+
+  RendererFactory factory = RendererFactory::Get();
+  ControlRenderer colorRenderer = factory.GetControlRenderer( color );
+  colorRenderer.SetOnStage( solidColorActor );
+
+  return solidColorActor;
+}
+
 } // namespace
 
 void dali_toolbar_startup(void)
@@ -88,15 +101,15 @@ int UtcDaliToolBarAddControl01(void)
 
   try
   {
-    ImageActor control1 = CreateSolidColorActor( Color::RED );
+    Actor control1 = CreateColorActor( Color::RED );
     control1.SetSize( Vector2( 100.f, 100.f ) );
-    ImageActor control2 = CreateSolidColorActor( Color::RED );
+    Actor control2 = CreateColorActor( Color::RED );
     control2.SetSize( Vector2( 100.f, 100.f ) );
-    ImageActor control3 = CreateSolidColorActor( Color::RED );
+    Actor control3 = CreateColorActor( Color::RED );
     control3.SetSize( Vector2( 100.f, 100.f ) );
-    ImageActor control4 = CreateSolidColorActor( Color::RED );
+    Actor control4 = CreateColorActor( Color::RED );
     control4.SetSize( Vector2( 100.f, 100.f ) );
-    ImageActor control5 = CreateSolidColorActor( Color::RED );
+    Actor control5 = CreateColorActor( Color::RED );
     control5.SetSize( Vector2( 100.f, 100.f ) );
 
     ToolBar toolbar = ToolBar::New();
@@ -113,11 +126,11 @@ int UtcDaliToolBarAddControl01(void)
     toolbar.AddControl( control4, 0.1f, Alignment::HorizontalCenter, Alignment::Padding( 1.f, 1.f, 1.f, 1.f ) );
     toolbar.AddControl( control5, 0.1f, Alignment::HorizontalRight, Alignment::Padding( 1.f, 1.f, 1.f, 1.f ) );
 
-    ImageActor control6 = CreateSolidColorActor( Color::RED );
+    Actor control6 = CreateColorActor( Color::RED );
     control6.SetSize( Vector2( 100.f, 100.f ) );
-    ImageActor control7 = CreateSolidColorActor( Color::RED );
+    Actor control7 = CreateColorActor( Color::RED );
     control7.SetSize( Vector2( 100.f, 100.f ) );
-    ImageActor control8 = CreateSolidColorActor( Color::RED );
+    Actor control8 = CreateColorActor( Color::RED );
     control8.SetSize( Vector2( 100.f, 100.f ) );
 
     application.Render();
@@ -147,7 +160,7 @@ int UtcDaliToolBarAddControl02(void)
 
   try
   {
-    ImageActor control = CreateSolidColorActor( Color::RED );
+    Actor control = CreateColorActor( Color::RED );
 
     ToolBar toolbar = ToolBar::New();
 
@@ -177,7 +190,7 @@ int UtcDaliToolBarRemoveControl01(void)
 
   try
   {
-    ImageActor control = CreateSolidColorActor( Color::RED );
+    Actor control = CreateColorActor( Color::RED );
 
     ToolBar toolbar = ToolBar::New();
     toolbar.AddControl( control, 0.1f, Alignment::HorizontalLeft );
@@ -200,8 +213,8 @@ int UtcDaliToolBarRemoveControl02(void)
 
   try
   {
-    ImageActor control01 = CreateSolidColorActor( Color::RED );
-    ImageActor control02 = CreateSolidColorActor( Color::RED );
+    Actor control01 = CreateColorActor( Color::RED );
+    Actor control02 = CreateColorActor( Color::RED );
 
     ToolBar toolbar01 = ToolBar::New();
     ToolBar toolbar02 = ToolBar::New();
@@ -222,7 +235,7 @@ int UtcDaliToolBarRemoveControl02(void)
 
   try
   {
-    ImageActor control = CreateSolidColorActor( Color::RED );
+    Actor control = CreateColorActor( Color::RED );
 
     ToolBar toolbar = ToolBar::New();
     toolbar.AddControl( control, 0.1f, Alignment::HorizontalLeft );
index de7e11620cc7fdac5e1ebd7dbd037c949efe5c09..686e81afe548e23084ddcbdaf10db7679fa2d5b9 100644 (file)
@@ -22,7 +22,6 @@
 // INTERNAL INCLUDES
 
 #include <dali-toolkit/internal/controls/popup/confirmation-popup-impl.h>
-#include <dali/public-api/actors/image-actor.h>
 
 using namespace Dali;
 
index 9ddea7cd4b48f39de47d0f9dad778eadfb8458d2..188c3c377fb08199ab0edc7b2ee18a6ee70a2cdd 100644 (file)
@@ -18,9 +18,6 @@
  *
  */
 
-// EXTERNAL INCLUDES
-#include <dali/public-api/actors/image-actor.h>
-
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control.h>
 
index 21514447be0538573b4382dfb46e1e0df2653bc9..310e3ce4ac24d27020ea86f8c1f88c462e43705b 100644 (file)
@@ -19,7 +19,6 @@
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/actors/image-actor.h>
 #include <dali/public-api/shader-effects/shader-effect.h>
 
 namespace Dali
index 332fa489e66a5f82c13e7d23baffcd4dc1ce95bf..326c7bdbf9f9d5bcce086356c44769a22ea6c5b2 100644 (file)
@@ -19,7 +19,6 @@
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/actors/image-actor.h>
 #include <dali/public-api/shader-effects/shader-effect.h>
 
 namespace Dali
index 7a5ad486b39aa0a4e6eb53f67ea6a98023752d7e..a3eac2cb77613c41227b7dd200f1783878699699 100644 (file)
@@ -31,6 +31,7 @@
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control.h>
 #include <dali-toolkit/public-api/controls/control-impl.h>
+#include <dali-toolkit/public-api/controls/image-view/image-view.h>
 
 namespace Dali
 {
@@ -57,8 +58,7 @@ Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_FOC
 const char* const ACTOR_FOCUSABLE("focusable");
 const char* const IS_FOCUS_GROUP("isFocusGroup");
 
-const char* FOCUS_BORDER_IMAGE_PATH = DALI_IMAGE_DIR "B16-8_TTS_focus.png";
-const Vector4 FOCUS_BORDER_IMAGE_BORDER = Vector4(7.0f, 7.0f, 7.0f, 7.0f);
+const char* FOCUS_BORDER_IMAGE_PATH = DALI_IMAGE_DIR "B16-8_TTS_focus.9.png";
 
 const char* FOCUS_SOUND_FILE = DALI_SOUND_DIR "Focus.ogg";
 const char* FOCUS_CHAIN_END_SOUND_FILE = DALI_SOUND_DIR "End_of_List.ogg";
@@ -663,12 +663,8 @@ void AccessibilityManager::SetFocusable(Actor actor, bool focusable)
 void AccessibilityManager::CreateDefaultFocusIndicatorActor()
 {
   // Create a focus indicator actor shared by all the focusable actors
-  Image borderImage = ResourceImage::New(FOCUS_BORDER_IMAGE_PATH);
-
-  ImageActor focusIndicator = ImageActor::New(borderImage);
+  Toolkit::ImageView focusIndicator = Toolkit::ImageView::New(FOCUS_BORDER_IMAGE_PATH);
   focusIndicator.SetParentOrigin( ParentOrigin::CENTER );
-  focusIndicator.SetStyle( ImageActor::STYLE_NINE_PATCH );
-  focusIndicator.SetNinePatchBorder(FOCUS_BORDER_IMAGE_BORDER);
   focusIndicator.SetPosition(Vector3(0.0f, 0.0f, 1.0f));
 
   // Apply size constraint to the focus indicator
index cc42f64bfe653de50280f4db82dcf3906c47602c..ea3f7e5c3cf086e1ca36c0bdb8bc1d54cb38b385 100644 (file)
@@ -22,7 +22,6 @@
 #include <sstream>
 #include <cmath>
 #include <dali/public-api/actors/camera-actor.h>
-#include <dali/public-api/actors/image-actor.h>
 #include <dali/public-api/render-tasks/render-task.h>
 
 // INTERNAL INCLUDES
index 1f5b966782c4b965abe5f82da0934ecf83ba4401..392fa9cccaf7ef2ff375ce300f2a03846e52a12f 100644 (file)
@@ -27,6 +27,8 @@
 #include <dali-toolkit/internal/controls/bubble-effect/bubble-actor.h>
 #include <dali-toolkit/internal/controls/bubble-effect/color-adjuster.h>
 #include <dali-toolkit/internal/controls/bubble-effect/bubble-effect.h>
+#include <dali-toolkit/public-api/controls/image-view/image-view.h>
+
 
 namespace
 {
@@ -174,13 +176,15 @@ void BubbleEmitter::SetBackground( Image bgImage, const Vector3& hsvDelta )
   mBackgroundImage = bgImage;
   mHSVDelta = hsvDelta;
 
-  ImageActor sourceActor = ImageActor::New( bgImage );
+  Toolkit::ImageView sourceActor = Toolkit::ImageView::New( bgImage );
   sourceActor.SetSize( mMovementArea );
   sourceActor.SetParentOrigin(ParentOrigin::CENTER);
-  Stage::GetCurrent().Add( sourceActor );
 
-  ShaderEffect colorAdjuster = CreateColorAdjuster( hsvDelta, true /*ignore alpha to make bubble color always*/ );
-  sourceActor.SetShaderEffect( colorAdjuster );
+  Property::Map colorAdjuster = CreateColorAdjuster();
+  sourceActor.SetProperty( Toolkit::ImageView::Property::IMAGE, colorAdjuster);
+  SetColorAdjusterProperties( sourceActor, hsvDelta, true /*ignore alpha to make bubble color always*/ );
+
+  Stage::GetCurrent().Add( sourceActor );
 
   RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
   RenderTask task = taskList.CreateTask();
@@ -231,15 +235,6 @@ void BubbleEmitter::OnRenderFinished(RenderTask& source)
 {
   mRenderTaskRunning = false;
   Actor sourceActor = source.GetSourceActor();
-  if( sourceActor )
-  {
-    ImageActor renderable = ImageActor::DownCast( sourceActor );
-    if( renderable )
-    {
-      renderable.RemoveShaderEffect();
-    }
-  }
-
   Stage stage = Stage::GetCurrent();
   stage.Remove(sourceActor);
   stage.GetRenderTaskList().RemoveTask(source);
index 37cbbb9e62591e8bc93ad440781facfbf18b05ef..1509248d088b26ff00d88590492c1121fb3774e1 100644 (file)
@@ -20,7 +20,6 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/actors/camera-actor.h>
-#include <dali/public-api/actors/image-actor.h>
 #include <dali/public-api/common/stage.h>
 #include <dali/public-api/images/frame-buffer-image.h>
 #include <dali/public-api/render-tasks/render-task.h>
index 8e24326368978934ad0ab573bd9bc94aa53100f5..c48dfe76a4470d71503c113948ffa2f5ca33f8d2 100644 (file)
@@ -18,7 +18,9 @@
  *
  */
 #include <dali/public-api/math/vector3.h>
-#include <dali/public-api/shader-effects/shader-effect.h>
+#include <dali/public-api/object/property-map.h>
+
+#define DALI_COMPOSE_SHADER(STR) #STR
 
 namespace Dali
 {
@@ -29,6 +31,12 @@ namespace Toolkit
 namespace Internal
 {
 
+inline void SetColorAdjusterProperties( Actor& actor, const Vector3& hsvDelta, bool ignoreAlpha = false )
+{
+  actor.RegisterProperty( "uHSVDelta", hsvDelta );
+  actor.RegisterProperty( "uIgnoreAlpha", ignoreAlpha ? 1.f : 0.f );
+}
+
 /**
 * Creates a new ColorAdjuster effect.
 * ColorAdjuster is a custom shader effect to adjust the image color in HSV space.
@@ -36,12 +44,14 @@ namespace Internal
 * @param[in] ignoreAlpha If true, the result color will be opaque even though source has alpha value
 * @return A handle to a newly allocated Dali resource.
 */
-inline ShaderEffect CreateColorAdjuster( const Vector3& hsvDelta, bool ignoreAlpha = false )
+inline Property::Map CreateColorAdjuster()
 {
   std::string fragmentShader = DALI_COMPOSE_SHADER(
     precision highp float;\n
     uniform vec3 uHSVDelta;\n
     uniform float uIgnoreAlpha;\n
+    varying mediump vec2 vTexCoord;\n
+    uniform sampler2D sTexture;\n
     float rand(vec2 co) \n
     {\n
       return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453); \n}
@@ -78,11 +88,13 @@ inline ShaderEffect CreateColorAdjuster( const Vector3& hsvDelta, bool ignoreAlp
     }\n
   );
 
-  ShaderEffect shaderEffect = ShaderEffect::New("", fragmentShader);
-  shaderEffect.SetUniform( "uHSVDelta", hsvDelta );
-  shaderEffect.SetUniform( "uIgnoreAlpha", ignoreAlpha?1.0f:0.0f );
+  Property::Map customShader;
+  customShader[ "fragmentShader" ] = fragmentShader;
+
+  Property::Map map;
+  map[ "shader" ] = customShader;
 
-  return shaderEffect;
+  return map;
 }
 
 } // namespace Internal
index f8b0fb295bc67871ec86ef766d9f02675b50b901..3132b2013a4ceb0406c4b550fa7a29ef9eacb012 100644 (file)
 #include <dali/public-api/images/resource-image.h>
 #include <dali/public-api/object/type-registry.h>
 #include <dali/devel-api/object/type-registry-helper.h>
-#include <dali/public-api/actors/image-actor.h>
 #include <dali/devel-api/scripting/scripting.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/default-controls/solid-color-actor.h>
 #include <dali-toolkit/public-api/controls/text-controls/text-label.h>
 #include <dali-toolkit/public-api/controls/image-view/image-view.h>
 
@@ -541,7 +539,9 @@ void Button::SetUnselectedColor( const Vector4& color )
   else
   {
     // If there is no existing content, create a new actor to use for flat color.
-    SetupContent( mUnselectedContent, CreateSolidColorActor( mUnselectedColor ) );
+    Toolkit::Control unselectedContentActor = Toolkit::Control::New();
+    unselectedContentActor.SetBackgroundColor( mUnselectedColor );
+    SetupContent( mUnselectedContent, unselectedContentActor );
     mUnselectedContent.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
   }
 }
@@ -563,7 +563,9 @@ void Button::SetSelectedColor( const Vector4& color )
   else
   {
     // If there is no existing content, create a new actor to use for flat color.
-    SetupContent( mSelectedContent, CreateSolidColorActor( mSelectedColor ) );
+    Toolkit::Control selectedContentActor = Toolkit::Control::New();
+    selectedContentActor.SetBackgroundColor( mSelectedColor );
+    SetupContent( mSelectedContent, selectedContentActor );
     mSelectedContent.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
   }
 }
index 49d84fbd3d569156c685a482df0b784536413b11..50d85e52a81f4b80f08a1ce2472ffc47b16701a5 100644 (file)
@@ -19,7 +19,6 @@
 #include "push-button-impl.h"
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/actors/image-actor.h>
 #include <dali/public-api/object/type-registry.h>
 #include <dali/devel-api/object/type-registry-helper.h>
 #include <dali/public-api/images/resource-image.h>
index 039a2f00d3ded3ab2928f748e38c4e1a398fe685..34130ae37a7a3059e11a8a75cd83b4d82e690c99 100644 (file)
@@ -19,7 +19,6 @@
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/actors/image-actor.h>
 #include <dali/public-api/common/dali-vector.h>
 
 // INTERNAL INCLUDES
index 63d0a43e0eca24010d860e1b4fd08c56ee1ded27..df095b0a859957c485ca8e50739e8f638aa8c1f4 100644 (file)
@@ -22,7 +22,6 @@
 #include <dali/public-api/actors/camera-actor.h>
 #include <dali/public-api/actors/layer.h>
 #include <dali/public-api/render-tasks/render-task.h>
-#include <dali/public-api/actors/image-actor.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control-impl.h>
index 5be63cf92bd13f7a9f45f3e03e0ba10e3d593459..91a714fbd9a70111bb10a49a0554ccea4d7036e9 100644 (file)
@@ -22,6 +22,7 @@
 #include <dali/devel-api/common/map-wrapper.h>
 #include <dali/public-api/actors/layer.h>
 #include <dali/public-api/actors/camera-actor.h>
+#include <dali/public-api/actors/image-actor.h>
 #include <dali/public-api/images/frame-buffer-image.h>
 #include <dali/public-api/render-tasks/render-task.h>
 
index 183c61382acde0329b48439b6845d4e48a9146c4..b521cffe794402525390d87d19ea00b6250f95a5 100644 (file)
@@ -19,7 +19,6 @@
 #include "confirmation-popup-impl.h"
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/actors/image-actor.h>
 #include <dali/public-api/images/resource-image.h>
 #include <dali/public-api/object/type-registry.h>
 #include <dali/devel-api/object/type-registry-helper.h>
index bbdb9a15346e8b7ae87c3f991c6c10ad03e547dc..4a260c55c4c0a83704fa51942597d6e632e4fddc 100755 (executable)
@@ -36,7 +36,6 @@
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.h>
 #include <dali-toolkit/public-api/controls/control-impl.h>
-#include <dali-toolkit/public-api/controls/default-controls/solid-color-actor.h>
 #include <dali-toolkit/public-api/controls/image-view/image-view.h>
 #include <dali-toolkit/public-api/accessibility-manager/accessibility-manager.h>
 #include <dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.h>
index f01d498b1adce2abd6b9e9d42884c1b04c95306e..6893716e55d31a446558327ef5d702579e3346f0 100755 (executable)
@@ -19,7 +19,6 @@
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/actors/image-actor.h>
 #include <dali/public-api/actors/layer.h>
 #include <dali/public-api/adaptor-framework/timer.h>
 #include <dali/public-api/animation/animation.h>
index 9e25fccc53883c5eaf022ebf5b142a94fea0e72c..c9fdc608f60df756d2eecfc5ee77ec84e3f1af2a 100755 (executable)
@@ -19,7 +19,6 @@
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/actors/image-actor.h>
 #include <dali/public-api/adaptor-framework/timer.h>
 #include <dali/public-api/object/property-array.h>
 
index 61388ac01c73b6f0d7988193768c6da6a58c8912..742e111a9893588f9aca00603418dc950b08941b 100644 (file)
@@ -31,7 +31,6 @@
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/default-controls/solid-color-actor.h>
 #include <dali-toolkit/public-api/controls/text-controls/text-label.h>
 #include <dali-toolkit/devel-api/controls/control-depth-index-ranges.h>
 #include <dali-toolkit/devel-api/controls/text-controls/text-selection-popup-callback-interface.h>
index 4444d0ca58385e7576ddd035b0bc1ad6f21079c9..e2a94971256e8897b6757b19e3563bf0fe720bb6 100644 (file)
@@ -26,7 +26,6 @@
 #include <dali-toolkit/devel-api/controls/text-controls/text-selection-toolbar.h>
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/actors/image-actor.h>
 #include <dali/public-api/actors/layer.h>
 
 namespace Dali
index 81ec84040b74b834b03402d859ef50173f94938c..b01019903f4524b27eafd07e4b9323c1f0882ca7 100644 (file)
@@ -27,7 +27,6 @@
 #include <dali/devel-api/object/type-registry-helper.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/default-controls/solid-color-actor.h>
 #include <dali-toolkit/public-api/controls/image-view/image-view.h>
 #include <dali-toolkit/devel-api/controls/control-depth-index-ranges.h>
 
index 5ce8db6e4f6554570fa78ced70412f72e9a9f1c1..a3e4d009ee3ae2b7e5c87d84c4632a588ae62160 100644 (file)
@@ -19,7 +19,6 @@
 #include "tool-bar-impl.h"
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/actors/image-actor.h>
 #include <dali/public-api/animation/constraints.h>
 #include <dali/public-api/object/type-registry.h>
 #include <dali/devel-api/object/type-registry-helper.h>
index 826ee4f5d9d18221b03809b649518210f5a560d2..c4d9a871663cd2cada4ad42c292aeb70ae771d36 100644 (file)
@@ -21,6 +21,7 @@
 // EXTERNAL INCLUDES
 #include <dali/public-api/common/stage.h>
 #include <dali/public-api/render-tasks/render-task-list.h>
+#include <dali/devel-api/rendering/renderer.h>
 
 namespace
 {
@@ -55,7 +56,7 @@ Actor Clipper::GetRootActor() const
   return mOffscreenRootActor;
 }
 
-ImageActor Clipper::GetImageActor() const
+Actor Clipper::GetImageActor() const
 {
   return mImageActor;
 }
@@ -103,10 +104,8 @@ void Clipper::Initialize( const Vector2& size )
   mOffscreenRootActor.SetDepthTestDisabled( true );
   mOffscreenRootActor.SetSize( offscreenSize );
 
-  mImageActor = ImageActor::New();
+  mImageActor = ImageView::New();
   mImageActor.SetParentOrigin( ParentOrigin::CENTER );
-  mImageActor.SetBlendFunc( BlendingFactor::ONE, BlendingFactor::ONE_MINUS_SRC_ALPHA,
-                            BlendingFactor::ONE, BlendingFactor::ONE );
   mImageActor.SetScale( Vector3( 1.0f, -1.0f, 1.0f ) );
   mImageActor.SetSize( offscreenSize );
 
@@ -130,11 +129,19 @@ void Clipper::Initialize( const Vector2& size )
                                                              Pixel::RGBA8888 );
   mImageActor.SetImage( frameBufferImage );
   mRenderTask.SetTargetFrameBuffer( frameBufferImage );
+  mImageActor.OnStageSignal().Connect(this, &Clipper::OnStageConnect);
 
   // Stores current size to avoid create new Dali resources if text changes.
   mCurrentOffscreenSize = offscreenSize;
 }
 
+void Clipper::OnStageConnect( Dali::Actor actor )
+{
+  Renderer renderer = mImageActor.GetRendererAt(0);
+  renderer.SetBlendFunc(BlendingFactor::ONE, BlendingFactor::ONE_MINUS_SRC_ALPHA,
+                        BlendingFactor::ONE, BlendingFactor::ONE);
+}
+
 Clipper::Clipper()
 {
 }
index 26bff0b849b43c1716bd39fce7ac3ff9199e00c9..a05855c4c0cf6ee5c92030711a53b7c6fed144fd 100644 (file)
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/actors/layer.h>
-#include <dali/public-api/actors/image-actor.h>
 #include <dali/public-api/actors/camera-actor.h>
 #include <dali/public-api/render-tasks/render-task.h>
+#include <dali-toolkit/public-api/controls/image-view/image-view.h>
+#include <dali/public-api/signals/connection-tracker.h>
 
 namespace Dali
 {
@@ -39,7 +40,7 @@ typedef IntrusivePtr<Clipper> ClipperPtr;
 /**
  * @brief A helper class for clipping actors using a FrameBufferImage.
  */
-class Clipper : public RefObject
+class Clipper : public RefObject, public ConnectionTracker
 {
 public:
 
@@ -63,7 +64,7 @@ public:
    *
    * @return The image actor.
    */
-  ImageActor GetImageActor() const;
+  Actor GetImageActor() const;
 
   /**
    * @brief Refresh the contents of the FrameBufferImage.
@@ -81,6 +82,13 @@ private: // Implementation
    */
   void Initialize( const Vector2& size );
 
+  /**
+   * The renderer is not created until the clipper actor is set on stage, only by then the blend function could be set.
+   *
+   * @param[in] actor The actor connected to stage.
+   */
+  void OnStageConnect( Dali::Actor actor );
+
   /**
    * Construct a new Clipper.
    */
@@ -101,7 +109,7 @@ private: // Data
 
   Layer mOffscreenRootActor;
   CameraActor mOffscreenCameraActor;
-  ImageActor mImageActor;
+  ImageView mImageActor;
   RenderTask mRenderTask;
   Vector2 mCurrentOffscreenSize;
 };
index 1791a8d452c71b0ed4c0d7650ea8361036c31fe5..43ccb78be6777a01371ecdfc8bb1ef439337b893 100644 (file)
@@ -33,7 +33,6 @@
 #include <dali/devel-api/rendering/renderer.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/default-controls/solid-color-actor.h>
 #include <dali-toolkit/public-api/controls/image-view/image-view.h>
 #include <dali-toolkit/devel-api/controls/control-depth-index-ranges.h>
 #include <dali-toolkit/internal/controls/image-view/image-view-impl.h>
@@ -529,7 +528,7 @@ struct Decorator::Impl : public ConnectionTracker
   {
     cursor = Control::New();
     cursor.SetBackgroundColor( color );
-    cursor.SetParentOrigin( ParentOrigin::TOP_LEFT ); // Need to set the default parent origin as CreateSolidColorActor() sets a different one.
+    cursor.SetParentOrigin( ParentOrigin::TOP_LEFT );
     cursor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
   }
 
index 8cfd4341e547402d564087bf9fbc6aac304b533c..ac61e9ee9e6eeee5a58b3ec5e37726ced5254910 100644 (file)
@@ -20,7 +20,6 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/actors/actor.h>
-#include <dali/public-api/actors/image-actor.h>
 
 namespace Dali
 {
index f4723753214fd95a8c23d12221ce1103e844e9b8..56cd667cff22285f89a1ed37dbac1c86f532ec4b 100644 (file)
@@ -22,9 +22,7 @@
 // INTERNAL INCLUDES
 
 #include <dali-toolkit/internal/controls/buttons/button-impl.h>
-
-// EXTERNAL INCLUDES
-#include <dali/public-api/actors/image-actor.h>
+#include <dali-toolkit/public-api/controls/image-view/image-view.h>
 
 namespace Dali
 {
@@ -202,14 +200,14 @@ void Button::SetLabel( Actor label )
 
 void Button::SetButtonImage( Image image )
 {
-  Actor imageActor = ImageActor::New( image );
+  Actor imageActor = Toolkit::ImageView::New( image );
   imageActor.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
   Dali::Toolkit::GetImplementation( *this ).SetButtonImage( imageActor );
 }
 
 void Button::SetSelectedImage( Image image )
 {
-  Actor imageActor = ImageActor::New( image );
+  Actor imageActor = Toolkit::ImageView::New( image );
   imageActor.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
   Dali::Toolkit::GetImplementation( *this ).SetSelectedImage( imageActor );
 }
index 24b98b5754208b4978470fc346a0ef4a03ecc897..90fcefdcfc3300f03e2b9bb695cd750e983faa25 100644 (file)
@@ -22,7 +22,6 @@
 // INTERNAL INCLUDES
 
 #include <dali-toolkit/internal/controls/buttons/push-button-impl.h>
-#include <dali/public-api/actors/image-actor.h>
 
 namespace Dali
 {
index 2f849bbcbbc08471040750de62df458c960e3ca4..84b37a6f888ed388167acf40dcdc3e08908e85c1 100644 (file)
@@ -21,7 +21,6 @@
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/default-controls/solid-color-actor.h>
 
-
 namespace Dali
 {
 
index ec5b1183d46c305b94337fdb2cf68d314804d626..f433553b4dff20f7c9173e19e06068c266189792 100644 (file)
@@ -22,6 +22,7 @@
 #include <dali/public-api/math/vector4.h>
 #include <dali/public-api/actors/image-actor.h>
 
+
 namespace Dali
 {
 
diff --git a/dali-toolkit/styles/images-common/B16-8_TTS_focus.9.png b/dali-toolkit/styles/images-common/B16-8_TTS_focus.9.png
new file mode 100644 (file)
index 0000000..535d0e9
Binary files /dev/null and b/dali-toolkit/styles/images-common/B16-8_TTS_focus.9.png differ
diff --git a/dali-toolkit/styles/images-common/B16-8_TTS_focus.png b/dali-toolkit/styles/images-common/B16-8_TTS_focus.png
deleted file mode 100644 (file)
index c03deba..0000000
Binary files a/dali-toolkit/styles/images-common/B16-8_TTS_focus.png and /dev/null differ