update demos with ResourceImage/Image split 34/35434/3
authorXiangyin Ma <x1.ma@samsung.com>
Fri, 13 Feb 2015 18:45:20 +0000 (18:45 +0000)
committerXiangyin Ma <x1.ma@samsung.com>
Tue, 17 Feb 2015 16:07:34 +0000 (16:07 +0000)
Change-Id: Ifdee5c061cedaf271fac15479a6e403ef161d527

21 files changed:
demo/dali-table-view.cpp
demo/scripts/table-view.json
examples/blocks/blocks-example.cpp
examples/builder/examples.cpp
examples/buttons/buttons-example.cpp
examples/cluster/cluster-example.cpp
examples/image/image-scaling-irregular-grid/image-scaling-irregular-grid-example.cpp
examples/item-view/item-view-example.cpp
examples/logging/logging-example.cpp
examples/motion/motion-blur-example.cpp
examples/motion/motion-stretch-example.cpp
examples/new-window/new-window-example.cpp
examples/page-turn-view/page-turn-view-example.cpp
examples/radial-menu/radial-menu-example.cpp
examples/scroll-view/scroll-view-example.cpp
examples/shader-effect/bubble-effect-example.cpp
examples/shader-effect/dissolve-effect-example.cpp
examples/shader-effect/refraction-effect-example.cpp
examples/shadows/shadow-bone-lighting-example.cpp
examples/shared/view.h
examples/transition/cube-transition-effect-example.cpp

index 8ecf31bbb64bb693824c7a46e31d163f26a9259a..5ce736cf2236fe17c841b411ba4975d85d31ea67 100644 (file)
@@ -120,7 +120,7 @@ TextStyle GetTableTextStyle()
  */
 ImageActor CreateBackground( std::string imagePath )
 {
-  Image image = Image::New( imagePath );
+  Image image = ResourceImage::New( imagePath );
   ImageActor background = ImageActor::New( image );
 
   background.SetAnchorPoint( AnchorPoint::CENTER );
@@ -516,7 +516,7 @@ Actor DaliTableView::CreateTile( const std::string& name, const std::string& tit
   // create background image
   if( addBackground )
   {
-    Image bg = Image::New( TILE_BACKGROUND );
+    Image bg = ResourceImage::New( TILE_BACKGROUND );
     ImageActor image = ImageActor::New( bg );
     image.SetAnchorPoint( AnchorPoint::CENTER );
     image.SetParentOrigin( ParentOrigin::CENTER );
@@ -562,7 +562,7 @@ Actor DaliTableView::CreateTile( const std::string& name, const std::string& tit
 
 ImageActor DaliTableView::NewStencilImage()
 {
-  Image alpha = Image::New( TILE_BACKGROUND_ALPHA );
+  Image alpha = ResourceImage::New( TILE_BACKGROUND_ALPHA );
 
   ImageActor stencilActor = ImageActor::New( alpha );
   stencilActor.SetStyle( ImageActor::STYLE_NINE_PATCH );
@@ -908,7 +908,7 @@ void DaliTableView::GenerateCircle( const Size& size, std::vector< unsigned char
 
 ImageActor DaliTableView::CreateLogo( std::string imagePath )
 {
-  Image image = Image::New( imagePath );
+  Image image = ResourceImage::New( imagePath );
   ImageActor logo = ImageActor::New( image );
 
   logo.SetAnchorPoint( AnchorPoint::CENTER );
index 1be3c9d213e36432bb486f1cdba11b62771ba8ab..85940fa4063cb85f5ce546af189c4a0d0faeaf76 100644 (file)
@@ -25,7 +25,6 @@
       "rows": 4,
       "columns":4,
       "cell-padding": [10, 5],
-      "layout-animation-duration": 0.5,
       "layout-rows": {  // set the height of the rows
         "0": { "policy": "fixed", "value": 40 },
         "1": { "policy": "relative", "value": 0.33 },
index 18ed96655d1e2e0a815696aaceb4af82cecdc154..c844a0b82df4678a2cccb386c17564cbc5bab483 100644 (file)
@@ -591,7 +591,7 @@ private:
     ImageAttributes attr;
     attr.SetSize( 128, 64 );
     attr.SetScalingMode( ImageAttributes::ScaleToFill );
-    Image img = Image::New(BRICK_IMAGE_PATH[type], attr);
+    Image img = ResourceImage::New(BRICK_IMAGE_PATH[type], attr);
     ImageActor brick = ImageActor::New(img);
     brick.SetParentOrigin(ParentOrigin::TOP_LEFT);
     brick.SetAnchorPoint(AnchorPoint::CENTER);
@@ -623,7 +623,7 @@ private:
    */
   ImageActor CreateImage(const std::string& filename)
   {
-    Image img = Image::New(filename);
+    Image img = ResourceImage::New(filename);
     ImageActor actor = ImageActor::New(img);
     actor.SetParentOrigin(ParentOrigin::TOP_LEFT);
     actor.SetAnchorPoint(AnchorPoint::CENTER);
index 0e26bdf9c71bf27ff06794050ea7793fa0da0ae8..fdebce417715b0164464866a5a621a5f89d230bb 100644 (file)
@@ -532,7 +532,7 @@ public:
 
     // Create an edit mode button. (left of toolbar)
     Toolkit::PushButton editButton = Toolkit::PushButton::New();
-    editButton.SetBackgroundImage( Image::New( EDIT_IMAGE ) );
+    editButton.SetBackgroundImage( ResourceImage::New( EDIT_IMAGE ) );
     editButton.ClickedSignal().Connect( this, &ExampleApp::OnToolSelectLayout);
     editButton.SetLeaveRequired( true );
     mToolBar.AddControl( editButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalLeft, DemoHelper::DEFAULT_MODE_SWITCH_PADDING  );
index 770a91d414ec5aa60e855426109178a9663c59c0..45ef0404a1ae8edf35f0c7adeae21d2ee60e2ecd 100644 (file)
@@ -142,7 +142,7 @@ class ButtonsController: public ConnectionTracker
 
     // Radio 1
     {
-      ImageActor imageActor = ImageActor::New( Image::New( SMALL_IMAGE_1 ) );
+      ImageActor imageActor = ImageActor::New( ResourceImage::New( SMALL_IMAGE_1 ) );
       imageActor.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) );
       mRadioButtonImage1 = Dali::Toolkit::RadioButton::New( imageActor );
       mRadioButtonImage1.SetParentOrigin( ParentOrigin::TOP_LEFT );
@@ -157,7 +157,7 @@ class ButtonsController: public ConnectionTracker
     {
       radioY += RADIO_LABEL_THUMBNAIL_SIZE + RADIO_IMAGE_SPACING;
 
-      ImageActor imageActor = ImageActor::New( Image::New( SMALL_IMAGE_2 ) );
+      ImageActor imageActor = ImageActor::New( ResourceImage::New( SMALL_IMAGE_2 ) );
       imageActor.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) );
 
       mRadioButtonImage2 = Dali::Toolkit::RadioButton::New( imageActor );
@@ -172,7 +172,7 @@ class ButtonsController: public ConnectionTracker
     {
       radioY += RADIO_LABEL_THUMBNAIL_SIZE + RADIO_IMAGE_SPACING;
 
-      ImageActor imageActor = ImageActor::New( Image::New( SMALL_IMAGE_3 ) );
+      ImageActor imageActor = ImageActor::New( ResourceImage::New( SMALL_IMAGE_3 ) );
       imageActor.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) );
 
       mRadioButtonImage3 = Dali::Toolkit::RadioButton::New( imageActor );
@@ -191,18 +191,18 @@ class ButtonsController: public ConnectionTracker
     mUpdateButton.SetLabel("Select");
     mUpdateButton.SetSize( DP(100), DP(BUTTON_HEIGHT) );
 
-    mUpdateButton.SetSelectedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) );
-    mUpdateButton.SetDisabledImage( Dali::Image::New( PUSHBUTTON_DISABLED_IMAGE ) );
-    mUpdateButton.SetButtonImage( Dali::Image::New( PUSHBUTTON_BUTTON_IMAGE ) );
+    mUpdateButton.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) );
+    mUpdateButton.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) );
+    mUpdateButton.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) );
 
     mUpdateButton.ClickedSignal().Connect( this, &ButtonsController::OnButtonClicked );
 
     radioButtonsGroup2.Add(mUpdateButton);
 
     // ImageActor to display selected image
-    mBigImage1 = Image::New( BIG_IMAGE_1 );
-    mBigImage2 = Image::New( BIG_IMAGE_2 );
-    mBigImage3 = Image::New( BIG_IMAGE_3 );
+    mBigImage1 = ResourceImage::New( BIG_IMAGE_1 );
+    mBigImage2 = ResourceImage::New( BIG_IMAGE_2 );
+    mBigImage3 = ResourceImage::New( BIG_IMAGE_3 );
 
     mImage = ImageActor::New( mBigImage1 );
     mImage.SetParentOrigin( ParentOrigin::TOP_RIGHT );
@@ -239,7 +239,7 @@ class ButtonsController: public ConnectionTracker
       alignment.Add( textView );
       tableView.AddChild( alignment, Toolkit::TableView::CellPosition( 0, 0 ) );
 
-      ImageActor imageActor = ImageActor::New( Image::New( ENABLED_IMAGE ) );
+      ImageActor imageActor = ImageActor::New( ResourceImage::New( ENABLED_IMAGE ) );
       imageActor.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) );
       tableView.AddChild( imageActor, Toolkit::TableView::CellPosition( 0, 1 ) );
       tableView.SetFixedWidth( 1, DP(RADIO_LABEL_THUMBNAIL_SIZE) );
@@ -279,8 +279,8 @@ class ButtonsController: public ConnectionTracker
     checkBoxBackground.SetSize( DP(430), DP(GROUP3_HEIGHT) );
     mContentLayer.Add( checkBoxBackground );
 
-    Dali::Image unselected = Dali::Image::New( CHECKBOX_UNSELECTED_IMAGE );
-    Dali::Image selected = Dali::Image::New( CHECKBOX_SELECTED_IMAGE );
+    Dali::Image unselected = Dali::ResourceImage::New( CHECKBOX_UNSELECTED_IMAGE );
+    Dali::Image selected = Dali::ResourceImage::New( CHECKBOX_SELECTED_IMAGE );
 
     int checkYPos = MARGIN_SIZE;
 
@@ -368,9 +368,9 @@ class ButtonsController: public ConnectionTracker
     toggleButton.SetLabel( "Unselected" );
     toggleButton.SetSize( DP(150), DP(BUTTON_HEIGHT) );
 
-    toggleButton.SetSelectedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) );
-    toggleButton.SetDisabledImage( Dali::Image::New( PUSHBUTTON_DISABLED_IMAGE ) );
-    toggleButton.SetButtonImage( Dali::Image::New( PUSHBUTTON_BUTTON_IMAGE ) );
+    toggleButton.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) );
+    toggleButton.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) );
+    toggleButton.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) );
 
     toggleButton.StateChangedSignal().Connect( this, &ButtonsController::OnButtonSelected );
 
index 91921f84672bdc3dd2d0569be386d8b46c7e0ed6..29f06f7df2e81a24863fb03b9d85e37e6bcff115 100644 (file)
@@ -493,10 +493,10 @@ public:
                                             "" );
 
     // Create a effect toggle button. (right of toolbar)
-    mLayoutButtonImages[ NO_EFFECT ] = Image::New( LAYOUT_NONE_IMAGE );
-    mLayoutButtonImages[ WOBBLE_EFFECT ] = Image::New( LAYOUT_WOBBLE_IMAGE );
-    mLayoutButtonImages[ CAROUSEL_EFFECT ] = Image::New( LAYOUT_CAROUSEL_IMAGE );
-    mLayoutButtonImages[ SPHERE_EFFECT ] = Image::New( LAYOUT_SPHERE_IMAGE );
+    mLayoutButtonImages[ NO_EFFECT ] = ResourceImage::New( LAYOUT_NONE_IMAGE );
+    mLayoutButtonImages[ WOBBLE_EFFECT ] = ResourceImage::New( LAYOUT_WOBBLE_IMAGE );
+    mLayoutButtonImages[ CAROUSEL_EFFECT ] = ResourceImage::New( LAYOUT_CAROUSEL_IMAGE );
+    mLayoutButtonImages[ SPHERE_EFFECT ] = ResourceImage::New( LAYOUT_SPHERE_IMAGE );
 
     mLayoutButton = Toolkit::PushButton::New();
     mLayoutButton.ClickedSignal().Connect( this, &ClusterController::OnEffectTouched );
@@ -525,7 +525,7 @@ public:
     mContentLayer.Add(mScrollView);
 
     // Create the image border shared by all the cluster image actors
-    mClusterBorderImage = Image::New(CLUSTER_BORDER_IMAGE_PATH);
+    mClusterBorderImage = ResourceImage::New(CLUSTER_BORDER_IMAGE_PATH);
 
     AddCluster( PEOPLE,   ClusterStyleStandard::New(ClusterStyleStandard::ClusterStyle1) );
     AddCluster( TODAY,    ClusterStyleStandard::New(ClusterStyleStandard::ClusterStyle2) );
@@ -556,7 +556,7 @@ public:
     DALI_ASSERT_ALWAYS(paths);
 
     // Add a background image to the cluster
-    Image bg = Image::New( CLUSTER_BACKGROUND_IMAGE_PATH );
+    Image bg = ResourceImage::New( CLUSTER_BACKGROUND_IMAGE_PATH );
     ImageActor image = ImageActor::New(bg);
     clusterActor.SetBackgroundImage(image);
 
@@ -590,7 +590,7 @@ public:
     attribs.SetPixelFormat( Pixel::RGB888  );
 
     // Add a shadow image child actor
-    Image shadowImage = Image::New( CLUSTER_SHADOW_IMAGE_PATH, attribs );
+    Image shadowImage = ResourceImage::New( CLUSTER_SHADOW_IMAGE_PATH, attribs );
     ImageActor shadowActor = ImageActor::New(shadowImage);
 
     // Shadow is not exactly located on the center of the image, so it is moved to a little
@@ -605,7 +605,7 @@ public:
     actor.Add( shadowActor );
 
     // Add a picture image actor to actor (with equal size to the parent).
-    Image image = Image::New( imagePath, attribs );
+    Image image = ResourceImage::New( imagePath, attribs );
     ImageActor imageActor = ImageActor::New( image );
     imageActor.SetParentOrigin( ParentOrigin::CENTER );
     imageActor.SetAnchorPoint( AnchorPoint::CENTER );
index 13e4c2641569a2fafe7cb28a8338f7940a89ba95..856654f1d1d857b345f42caafec51b810ec50520 100644 (file)
@@ -182,7 +182,7 @@ Image CreateImage(const std::string& filename, unsigned int width, unsigned int
 
   attributes.SetSize( width, height );
   attributes.SetScalingMode( scalingMode );
-  Image image = Image::New( filename, attributes );
+  Image image = ResourceImage::New( filename, attributes );
   return image;
 }
 
@@ -307,7 +307,7 @@ public:
                                             "" );
 
     // Create an image scaling toggle button. (right of toolbar)
-    Image toggleScalingImage = Image::New( TOGGLE_SCALING_IMAGE );
+    Image toggleScalingImage = ResourceImage::New( TOGGLE_SCALING_IMAGE );
     Toolkit::PushButton toggleScalingButton = Toolkit::PushButton::New();
     toggleScalingButton.SetBackgroundImage( toggleScalingImage );
     toggleScalingButton.ClickedSignal().Connect( this, &ImageScalingIrregularGridController::OnToggleScalingTouched );
@@ -472,7 +472,7 @@ public:
 
         ImageActor imageActor = ImageActor::DownCast( actor );
         Image oldImage = imageActor.GetImage();
-        Image newImage = CreateImage( oldImage.GetFilename(), imageSize.width + 0.5f, imageSize.height + 0.5f, newMode );
+        Image newImage = CreateImage( ResourceImage::DownCast(oldImage).GetUrl(), imageSize.width + 0.5f, imageSize.height + 0.5f, newMode );
         imageActor.SetImage( newImage );
         mScalingModes[id] = newMode;
       }
@@ -514,7 +514,7 @@ public:
         const Vector2 imageSize = mSizes[gridImageActor.GetId()];
         ImageAttributes::ScalingMode newMode = NextMode( mScalingModes[gridImageActor.GetId()] );
         Image oldImage = gridImageActor.GetImage();
-        Image newImage = CreateImage( oldImage.GetFilename(), imageSize.width, imageSize.height, newMode );
+        Image newImage = CreateImage(ResourceImage::DownCast(oldImage).GetUrl(), imageSize.width, imageSize.height, newMode );
         gridImageActor.SetImage( newImage );
 
         mScalingModes[gridImageActor.GetId()] = newMode;
index b006c5feccba33fc099dc603940c5253e6ed2436..bc2833bbf967487e8d1c39c2fbe13a5224139a31 100644 (file)
@@ -251,7 +251,7 @@ public:
     Vector2 stageSize = Stage::GetCurrent().GetSize();
 
     // Create a border image shared by all the item actors
-    mBorderImage = Image::New(ITEM_BORDER_IMAGE_PATH);
+    mBorderImage = ResourceImage::New(ITEM_BORDER_IMAGE_PATH);
 
     // Creates a default view with a default tool bar.
     // The view is added to the stage.
@@ -266,14 +266,14 @@ public:
 
     // Create an edit mode button. (left of toolbar)
     Toolkit::PushButton editButton = Toolkit::PushButton::New();
-    editButton.SetBackgroundImage( Image::New( EDIT_IMAGE ) );
+    editButton.SetBackgroundImage( ResourceImage::New( EDIT_IMAGE ) );
     editButton.ClickedSignal().Connect( this, &ItemViewExample::OnModeButtonClicked);
     editButton.SetLeaveRequired( true );
     mToolBar.AddControl( editButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalLeft, DemoHelper::DEFAULT_MODE_SWITCH_PADDING  );
 
     // Create a layout toggle button. (right of toolbar)
     mLayoutButton = Toolkit::PushButton::New();
-    mLayoutButton.SetBackgroundImage( Image::New( SPIRAL_LAYOUT_IMAGE ) );
+    mLayoutButton.SetBackgroundImage( ResourceImage::New( SPIRAL_LAYOUT_IMAGE ) );
     mLayoutButton.ClickedSignal().Connect( this, &ItemViewExample::OnLayoutButtonClicked);
     mLayoutButton.SetLeaveRequired( true );
     mToolBar.AddControl( mLayoutButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING  );
@@ -284,8 +284,8 @@ public:
     mDeleteButton.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT);
     mDeleteButton.SetPosition( BUTTON_BORDER, BUTTON_BORDER );
     mDeleteButton.SetDrawMode( DrawMode::OVERLAY );
-    mDeleteButton.SetBackgroundImage( Image::New( TOOLBAR_IMAGE ) );
-    mDeleteButton.SetButtonImage( Image::New( DELETE_IMAGE ) );
+    mDeleteButton.SetBackgroundImage( ResourceImage::New( TOOLBAR_IMAGE ) );
+    mDeleteButton.SetButtonImage( ResourceImage::New( DELETE_IMAGE ) );
     mDeleteButton.SetSize( stageSize.width * 0.15f, stageSize.width * 0.15f );
     mDeleteButton.ClickedSignal().Connect( this, &ItemViewExample::OnDeleteButtonClicked);
     mDeleteButton.SetLeaveRequired( true );
@@ -298,8 +298,8 @@ public:
     mInsertButton.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT);
     mInsertButton.SetPosition( BUTTON_BORDER, BUTTON_BORDER );
     mInsertButton.SetDrawMode( DrawMode::OVERLAY );
-    mInsertButton.SetBackgroundImage( Image::New( TOOLBAR_IMAGE ) );
-    mInsertButton.SetButtonImage( Image::New( INSERT_IMAGE ) );
+    mInsertButton.SetBackgroundImage( ResourceImage::New( TOOLBAR_IMAGE ) );
+    mInsertButton.SetButtonImage( ResourceImage::New( INSERT_IMAGE ) );
     mInsertButton.SetSize( stageSize.width * 0.15f, stageSize.width * 0.15f );
     mInsertButton.ClickedSignal().Connect( this, &ItemViewExample::OnInsertButtonClicked);
     mInsertButton.SetLeaveRequired( true );
@@ -312,8 +312,8 @@ public:
     mReplaceButton.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT);
     mReplaceButton.SetPosition( BUTTON_BORDER, BUTTON_BORDER );
     mReplaceButton.SetDrawMode( DrawMode::OVERLAY );
-    mReplaceButton.SetBackgroundImage( Image::New( TOOLBAR_IMAGE ) );
-    mReplaceButton.SetButtonImage( Image::New( REPLACE_IMAGE ) );
+    mReplaceButton.SetBackgroundImage( ResourceImage::New( TOOLBAR_IMAGE ) );
+    mReplaceButton.SetButtonImage( ResourceImage::New( REPLACE_IMAGE ) );
     mReplaceButton.SetSize( stageSize.width * 0.15f, stageSize.width * 0.15f );
     mReplaceButton.ClickedSignal().Connect( this, &ItemViewExample::OnReplaceButtonClicked);
     mReplaceButton.SetLeaveRequired( true );
@@ -844,19 +844,19 @@ public:
       {
         case SPIRAL_LAYOUT:
         {
-          mLayoutButton.SetBackgroundImage( Image::New( SPIRAL_LAYOUT_IMAGE ) );
+          mLayoutButton.SetBackgroundImage( ResourceImage::New( SPIRAL_LAYOUT_IMAGE ) );
           break;
         }
 
         case GRID_LAYOUT:
         {
-          mLayoutButton.SetBackgroundImage( Image::New( GRID_LAYOUT_IMAGE ) );
+          mLayoutButton.SetBackgroundImage( ResourceImage::New( GRID_LAYOUT_IMAGE ) );
           break;
         }
 
         case DEPTH_LAYOUT:
         {
-          mLayoutButton.SetBackgroundImage( Image::New( DEPTH_LAYOUT_IMAGE ) );
+          mLayoutButton.SetBackgroundImage( ResourceImage::New( DEPTH_LAYOUT_IMAGE ) );
           break;
         }
 
@@ -885,7 +885,7 @@ public: // From ItemFactory
   virtual Actor NewItem(unsigned int itemId)
   {
     // Create an image actor for this item
-    Image image = Image::New( IMAGE_PATHS[itemId % NUM_IMAGES] );
+    Image image = ResourceImage::New( IMAGE_PATHS[itemId % NUM_IMAGES] );
     Actor actor = ImageActor::New(image);
     actor.SetPosition( INITIAL_OFFSCREEN_POSITION );
 
@@ -924,7 +924,7 @@ public: // From ItemFactory
     }
     actor.Add( checkbox );
 
-    ImageActor tick = ImageActor::New( Image::New(SELECTED_IMAGE) );
+    ImageActor tick = ImageActor::New( ResourceImage::New(SELECTED_IMAGE) );
     tick.SetColorMode( USE_OWN_COLOR );
     tick.SetName( "Tick" );
     tick.SetParentOrigin( ParentOrigin::TOP_RIGHT );
index 34eb7f5d621b2791c6693ad626eef0361accacb2..2dc943f4d6335e825df404dcf311919a7b06b0f2 100644 (file)
@@ -286,9 +286,9 @@ class LoggingController: public ConnectionTracker
       button.SetPosition( buttonXDP, 0 );
       button.SetSize( buttonWidthDP, DP(BUTTON_HEIGHT) );
 
-      button.SetSelectedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) );
-      button.SetButtonImage( Dali::Image::New( PUSHBUTTON_BUTTON_IMAGE ) );
-      button.SetDisabledImage( Dali::Image::New( PUSHBUTTON_DISABLED_IMAGE ) );
+      button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) );
+      button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) );
+      button.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) );
 
       button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked );
 
@@ -306,9 +306,9 @@ class LoggingController: public ConnectionTracker
       button.SetPosition( buttonXDP, 0 );
       button.SetSize( buttonWidthDP, DP(BUTTON_HEIGHT) );
 
-      button.SetSelectedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) );
-      button.SetButtonImage( Dali::Image::New( PUSHBUTTON_BUTTON_IMAGE ) );
-      button.SetDisabledImage( Dali::Image::New( PUSHBUTTON_DISABLED_IMAGE ) );
+      button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) );
+      button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) );
+      button.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) );
 
       button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked );
 
@@ -337,9 +337,9 @@ class LoggingController: public ConnectionTracker
       button.SetPosition( buttonXDP, 0 );
       button.SetSize( buttonWidthDP, DP(BUTTON_HEIGHT) );
 
-      button.SetSelectedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) );
-      button.SetButtonImage( Dali::Image::New( PUSHBUTTON_BUTTON_IMAGE ) );
-      button.SetDisabledImage( Dali::Image::New( PUSHBUTTON_DISABLED_IMAGE ) );
+      button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) );
+      button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) );
+      button.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) );
 
       button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked );
 
@@ -357,9 +357,9 @@ class LoggingController: public ConnectionTracker
       button.SetPosition( buttonXDP, 0 );
       button.SetSize( buttonWidthDP, DP(BUTTON_HEIGHT) );
 
-      button.SetSelectedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) );
-      button.SetButtonImage( Dali::Image::New( PUSHBUTTON_BUTTON_IMAGE ) );
-      button.SetDisabledImage( Dali::Image::New( PUSHBUTTON_DISABLED_IMAGE ) );
+      button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) );
+      button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) );
+      button.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) );
 
       button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked );
 
@@ -388,9 +388,9 @@ class LoggingController: public ConnectionTracker
       button.SetPosition( buttonXDP, 0 );
       button.SetSize( buttonWidthDP, DP(BUTTON_HEIGHT) );
 
-      button.SetSelectedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) );
-      button.SetButtonImage( Dali::Image::New( PUSHBUTTON_BUTTON_IMAGE ) );
-      button.SetDisabledImage( Dali::Image::New( PUSHBUTTON_DISABLED_IMAGE ) );
+      button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) );
+      button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) );
+      button.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) );
 
       button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked );
 
@@ -408,9 +408,9 @@ class LoggingController: public ConnectionTracker
       button.SetPosition( buttonXDP, 0 );
       button.SetSize( buttonWidthDP, DP(BUTTON_HEIGHT) );
 
-      button.SetSelectedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) );
-      button.SetButtonImage( Dali::Image::New( PUSHBUTTON_BUTTON_IMAGE ) );
-      button.SetDisabledImage( Dali::Image::New( PUSHBUTTON_DISABLED_IMAGE ) );
+      button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) );
+      button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) );
+      button.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) );
 
       button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked );
 
@@ -520,9 +520,9 @@ class LoggingController: public ConnectionTracker
       button.SetPosition( buttonXDP, 0 );
       button.SetSize( buttonWidthDP, DP(BUTTON_HEIGHT) );
 
-      button.SetSelectedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) );
-      button.SetButtonImage( Dali::Image::New( PUSHBUTTON_BUTTON_IMAGE ) );
-      button.SetDisabledImage( Dali::Image::New( PUSHBUTTON_DISABLED_IMAGE ) );
+      button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) );
+      button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) );
+      button.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) );
 
       button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked );
 
index 4100f447a736d09ea08053ae5500a99b1bf743d1..98afa1a6ca97cb816ac59a30829bbbb4d1a97b8d 100644 (file)
@@ -149,8 +149,8 @@ public:
                                             APPLICATION_TITLE );
 
     //Add an effects icon on the right of the title
-    mIconEffectsOff = Image::New( EFFECTS_OFF_ICON );
-    mIconEffectsOn = Image::New( EFFECTS_ON_ICON );
+    mIconEffectsOff = ResourceImage::New( EFFECTS_OFF_ICON );
+    mIconEffectsOn = ResourceImage::New( EFFECTS_ON_ICON );
     mActorEffectsButton = Toolkit::PushButton::New();
     mActorEffectsButton.SetBackgroundImage( mIconEffectsOff );
     mActorEffectsButton.ClickedSignal().Connect( this, &MotionBlurExampleApp::OnEffectButtonClicked );
@@ -158,7 +158,7 @@ public:
 
     // Creates a mode button.
     // Create a effect toggle button. (right of toolbar)
-    Image imageLayout = Image::New( LAYOUT_IMAGE );
+    Image imageLayout = ResourceImage::New( LAYOUT_IMAGE );
     Toolkit::PushButton layoutButton = Toolkit::PushButton::New();
     layoutButton.SetBackgroundImage(imageLayout);
     layoutButton.ClickedSignal().Connect( this, &MotionBlurExampleApp::OnLayoutButtonClicked);
@@ -187,7 +187,7 @@ public:
     // Motion blurred actor
     //
 
-    Image image = Image::New( MOTION_BLUR_ACTOR_IMAGE1 );
+    Image image = ResourceImage::New( MOTION_BLUR_ACTOR_IMAGE1 );
     mMotionBlurImageActor = ImageActor::New(image);
     mMotionBlurImageActor.SetParentOrigin( ParentOrigin::CENTER );
     mMotionBlurImageActor.SetSize(MOTION_BLUR_ACTOR_WIDTH, MOTION_BLUR_ACTOR_HEIGHT);
@@ -478,7 +478,7 @@ public:
       mCurrentImage = 0;
     }
 
-    Image blurImage = Image::New( MOTION_BLUR_ACTOR_IMAGES[mCurrentImage] );
+    Image blurImage = ResourceImage::New( MOTION_BLUR_ACTOR_IMAGES[mCurrentImage] );
     mMotionBlurImageActor.SetImage(blurImage);
   }
 
index db224ae76eb07e812019ff48b583732a4ce510bc..21e43c2b9f8b676ed34ad830d96377d4cc5b9270 100644 (file)
@@ -136,8 +136,8 @@ public:
                                             APPLICATION_TITLE );
 
     //Add an slideshow icon on the right of the title
-    mIconEffectsOff = Image::New( EFFECTS_OFF_ICON );
-    mIconEffectsOn = Image::New( EFFECTS_ON_ICON );
+    mIconEffectsOff = ResourceImage::New( EFFECTS_OFF_ICON );
+    mIconEffectsOn = ResourceImage::New( EFFECTS_ON_ICON );
     mActorEffectsButton = Toolkit::PushButton::New();
     mActorEffectsButton.SetBackgroundImage( mIconEffectsOff );
     mActorEffectsButton.ClickedSignal().Connect( this, &MotionStretchExampleApp::OnEffectButtonClicked );
@@ -145,7 +145,7 @@ public:
 
     // Creates a mode button.
     // Create a effect toggle button. (right of toolbar)
-    Image imageLayout = Image::New( LAYOUT_IMAGE );
+    Image imageLayout = ResourceImage::New( LAYOUT_IMAGE );
     Toolkit::PushButton layoutButton = Toolkit::PushButton::New();
     layoutButton.SetBackgroundImage(imageLayout);
     layoutButton.ClickedSignal().Connect( this, &MotionStretchExampleApp::OnLayoutButtonClicked);
@@ -174,7 +174,7 @@ public:
     // Motion stretched actor
     //
 
-    Image image = Image::New( MOTION_STRETCH_ACTOR_IMAGE1 );
+    Image image = ResourceImage::New( MOTION_STRETCH_ACTOR_IMAGE1 );
     mMotionStretchImageActor = ImageActor::New(image);
     mMotionStretchImageActor.SetParentOrigin( ParentOrigin::CENTER );
     mMotionStretchImageActor.SetAnchorPoint( AnchorPoint::CENTER );
@@ -390,7 +390,7 @@ public:
       mCurrentImage = 0;
     }
 
-    Image stretchImage = Image::New( MOTION_STRETCH_ACTOR_IMAGES[mCurrentImage] );
+    Image stretchImage = ResourceImage::New( MOTION_STRETCH_ACTOR_IMAGES[mCurrentImage] );
     mMotionStretchImageActor.SetImage(stretchImage);
   }
 
index ff17e0fb4996afb094c41f8976e24fa60cdc3f30..4de0f85085073f74082a86d93e350904291cf9f7 100644 (file)
@@ -147,7 +147,7 @@ void NewWindowController::Create( Application& app )
   }
 
   mLoseContextButton = Toolkit::PushButton::New();
-  mLoseContextButton.SetBackgroundImage( Image::New( LOSE_CONTEXT_IMAGE ) );
+  mLoseContextButton.SetBackgroundImage( ResourceImage::New( LOSE_CONTEXT_IMAGE ) );
   mLoseContextButton.ClickedSignal().Connect( this, &NewWindowController::OnLoseContextButtonClicked );
   mToolBar.AddControl( mLoseContextButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING );
 
@@ -158,7 +158,7 @@ void NewWindowController::Create( Application& app )
   logoLayoutActor.SetScale(0.5f);
   mContentLayer.Add(logoLayoutActor);
 
-  Image image = Image::New(DALI_IMAGE_DIR "dali-logo.png");
+  Image image = ResourceImage::New(DALI_IMAGE_DIR "dali-logo.png");
   mImageActor = ImageActor::New(image);
   mImageActor.SetName("dali-logo");
   mImageActor.SetParentOrigin(ParentOrigin::CENTER);
@@ -194,7 +194,7 @@ bool NewWindowController::OnLoseContextButtonClicked( Toolkit::Button button )
 
 void NewWindowController::CreateMeshActor()
 {
-  mEffectImage = Image::New(EFFECT_IMAGE);
+  mEffectImage = ResourceImage::New(EFFECT_IMAGE);
 
   Material baseMaterial = Material::New( "Material1" );
   Dali::MeshActor meshActor = MeshActor::New( CreateMesh(true, baseMaterial) );
@@ -220,7 +220,7 @@ void NewWindowController::CreateMeshActor()
 FrameBufferImage NewWindowController::CreateMirrorImage(const char* imageName)
 {
   FrameBufferImage fbo;
-  Image image = Image::New(imageName);
+  Image image = ResourceImage::New(imageName);
   fbo = CreateFrameBufferForImage(imageName, image, ShaderEffect());
   return fbo;
 }
@@ -228,8 +228,8 @@ FrameBufferImage NewWindowController::CreateMirrorImage(const char* imageName)
 ImageActor NewWindowController::CreateBlurredMirrorImage(const char* imageName)
 {
   FrameBufferImage fbo;
-  Image image = Image::New( imageName );
-  Vector2 FBOSize = Image::GetImageSize(imageName);
+  Image image = ResourceImage::New( imageName );
+  Vector2 FBOSize = ResourceImage::GetImageSize(imageName);
   fbo = FrameBufferImage::New( FBOSize.width, FBOSize.height, Pixel::RGBA8888);
   GaussianBlurView gbv = GaussianBlurView::New(5, 2.0f, Pixel::RGBA8888, 0.5f, 0.5f, true);
   gbv.SetBackgroundColor(Color::TRANSPARENT);
@@ -247,7 +247,7 @@ ImageActor NewWindowController::CreateBlurredMirrorImage(const char* imageName)
 FrameBufferImage NewWindowController::CreateFrameBufferForImage(const char* imageName, Image image, ShaderEffect shaderEffect)
 {
   Stage stage = Stage::GetCurrent();
-  Vector2 FBOSize = Image::GetImageSize(imageName);
+  Vector2 FBOSize = ResourceImage::GetImageSize(imageName);
 
   FrameBufferImage framebuffer = FrameBufferImage::New(FBOSize.x, FBOSize.y );
 
@@ -288,10 +288,10 @@ FrameBufferImage NewWindowController::CreateFrameBufferForImage(const char* imag
 void NewWindowController::CreateBubbles(Vector2 stageSize)
 {
   mEmitter = Toolkit::BubbleEmitter::New( stageSize,
-                                          Image::New( DALI_IMAGE_DIR "bubble-ball.png" ),
+                                          ResourceImage::New( DALI_IMAGE_DIR "bubble-ball.png" ),
                                           1000, Vector2( 5.0f, 5.0f ) );
 
-  Image background = Image::New(BACKGROUND_IMAGE);
+  Image background = ResourceImage::New(BACKGROUND_IMAGE);
   mEmitter.SetBackground( background, mHSVDelta );
   Actor bubbleRoot = mEmitter.GetRootActor();
   mContentLayer.Add( bubbleRoot );
@@ -376,7 +376,7 @@ void NewWindowController::CreateBlending()
   blendShader.SetEffectImage( fb2 );
   blendShader.SetUniform("alpha", 0.5f);
 
-  mBaseImage = Image::New(BASE_IMAGE);
+  mBaseImage = ResourceImage::New(BASE_IMAGE);
   mBlendActor = ImageActor::New( mBaseImage );
   mBlendActor.SetParentOrigin(ParentOrigin::CENTER);
   mBlendActor.SetPosition(Vector3(150.0f, 200.0f, 0.0f));
index e08bf34a4ad8031a022a79b9405558f017ae1090..9d10ca0363d3bb99e40bc508748a794fb51c9697 100644 (file)
@@ -79,11 +79,11 @@ class PortraitPageFactory : public PageFactory
   {
     if( pageId == 0 )
     {
-      return ImageActor::New( Image::New( BOOK_COVER_PORTRAIT ) );
+      return ImageActor::New( ResourceImage::New( BOOK_COVER_PORTRAIT ) );
     }
     else
     {
-      return ImageActor::New( Image::New( PAGE_IMAGES_PORTRAIT[ (pageId-1) % NUMBER_OF_PORTRAIT_IMAGE ] ) );
+      return ImageActor::New( ResourceImage::New( PAGE_IMAGES_PORTRAIT[ (pageId-1) % NUMBER_OF_PORTRAIT_IMAGE ] ) );
     }
   }
 };
@@ -109,14 +109,14 @@ class LandscapePageFactory : public PageFactory
     ImageActor pageBack;
     if( pageId == 0 )
     {
-       pageFront = ImageActor::New( Image::New( BOOK_COVER_LANDSCAPE ) );
-       pageBack = ImageActor::New( Image::New( BOOK_COVER_BACK_LANDSCAPE ) );
+       pageFront = ImageActor::New( ResourceImage::New( BOOK_COVER_LANDSCAPE ) );
+       pageBack = ImageActor::New( ResourceImage::New( BOOK_COVER_BACK_LANDSCAPE ) );
     }
     else
     {
       unsigned int imageId = (pageId-1)*2;
-      pageFront = ImageActor::New( Image::New( PAGE_IMAGES_LANDSCAPE[ imageId % NUMBER_OF_LANDSCAPE_IMAGE ] ) );
-      pageBack = ImageActor::New( Image::New( PAGE_IMAGES_LANDSCAPE[ (imageId+1) % NUMBER_OF_LANDSCAPE_IMAGE ] ) );
+      pageFront = ImageActor::New( ResourceImage::New( PAGE_IMAGES_LANDSCAPE[ imageId % NUMBER_OF_LANDSCAPE_IMAGE ] ) );
+      pageBack = ImageActor::New( ResourceImage::New( PAGE_IMAGES_LANDSCAPE[ (imageId+1) % NUMBER_OF_LANDSCAPE_IMAGE ] ) );
     }
     pageFront.Add(pageBack);
     return pageFront;
index 50ac16b8d093f6484cdbdea12f537163d7496c80..bce680f06ea2af82a51f5d22cdfba8035284a3f8 100644 (file)
@@ -135,8 +135,8 @@ void RadialMenuExample::OnInit(Application& app)
                                       TOOLBAR_IMAGE,
                                       APPLICATION_TITLE );
 
-  mIconPlay = Image::New( PLAY_ICON );
-  mIconStop = Image::New( STOP_ICON );
+  mIconPlay = ResourceImage::New( PLAY_ICON );
+  mIconStop = ResourceImage::New( STOP_ICON );
   mPlayStopButton = Toolkit::PushButton::New();
   mPlayStopButton.SetBackgroundImage( mIconStop );
 
@@ -147,7 +147,7 @@ void RadialMenuExample::OnInit(Application& app)
                       Toolkit::Alignment::HorizontalRight,
                       DemoHelper::DEFAULT_PLAY_PADDING );
 
-  Vector2 imgSize = Image::GetImageSize(TEST_OUTER_RING_FILENAME);
+  Vector2 imgSize = ResourceImage::GetImageSize(TEST_OUTER_RING_FILENAME);
   Vector2 stageSize = stage.GetSize();
   float minStageDimension = std::min(stageSize.width, stageSize.height);
 
@@ -163,7 +163,7 @@ void RadialMenuExample::OnInit(Application& app)
   mRadialSweepView3.SetInitialActorAngle(Degree(-110));
   mRadialSweepView3.SetFinalActorAngle(Degree(0));
 
-  Image dial = Image::New( TEST_DIAL_FILENAME );
+  Image dial = ResourceImage::New( TEST_DIAL_FILENAME );
   mDialActor = ImageActor::New( dial );
   mDialActor.SetPositionInheritanceMode(USE_PARENT_POSITION);
   mDialActor.SetScale(scale);
@@ -238,13 +238,13 @@ RadialSweepView RadialMenuExample::CreateSweepView( std::string imageName,
                                                     Degree finalAngle)
 {
   // Create the image
-  Image image = Image::New(imageName);
+  Image image = ResourceImage::New(imageName);
   mImageActor = ImageActor::New(image);
   mImageActor.SetParentOrigin(ParentOrigin::CENTER);
   mImageActor.SetAnchorPoint(AnchorPoint::CENTER);
 
   // Create the stencil
-  Vector2 imageSize = Image::GetImageSize(imageName);
+  Vector2 imageSize = ResourceImage::GetImageSize(imageName);
   float diameter = std::max(imageSize.width, imageSize.height);
   RadialSweepView radialSweepView = RadialSweepView::New();
   radialSweepView.SetDiameter( diameter );
index 32c41c47b1ccc98cb6d17dae55be7931c12a5aa6..f1a4c05495e6b1902c117a645f1b99311c6db122 100644 (file)
@@ -194,11 +194,11 @@ public:
                                             TOOLBAR_IMAGE,
                                             "" );
 
-    mEffectIcon[ DepthEffect ]     = Image::New( EFFECT_DEPTH_IMAGE );
-    mEffectIcon[ CubeEffect ]      = Image::New( EFFECT_INNER_CUBE_IMAGE );
-    mEffectIcon[ PageCarouselEffect ] = Image::New( EFFECT_CAROUSEL_IMAGE );
-    mEffectIcon[ PageCubeEffect ]     = Image::New( EFFECT_CAROUSEL_IMAGE );
-    mEffectIcon[ PageSpiralEffect ]   = Image::New( EFFECT_CAROUSEL_IMAGE );
+    mEffectIcon[ DepthEffect ]     = ResourceImage::New( EFFECT_DEPTH_IMAGE );
+    mEffectIcon[ CubeEffect ]      = ResourceImage::New( EFFECT_INNER_CUBE_IMAGE );
+    mEffectIcon[ PageCarouselEffect ] = ResourceImage::New( EFFECT_CAROUSEL_IMAGE );
+    mEffectIcon[ PageCubeEffect ]     = ResourceImage::New( EFFECT_CAROUSEL_IMAGE );
+    mEffectIcon[ PageSpiralEffect ]   = ResourceImage::New( EFFECT_CAROUSEL_IMAGE );
 
     // Create a effect change button. (right of toolbar)
     mEffectChangeButton = Toolkit::PushButton::New();
@@ -563,7 +563,7 @@ private:
 
     attributes.SetSize(width, height);
     attributes.SetScalingMode(ImageAttributes::ShrinkToFit);
-    Image img = Image::New(filename, attributes);
+    Image img = ResourceImage::New(filename, attributes);
     ImageActor actor = ImageActor::New(img);
     actor.SetName( filename );
     actor.SetParentOrigin(ParentOrigin::CENTER);
index 6768ae2b022fffd47bef2d2fc3483e7ec99cb222..f5b9d64bd0740e29c69b336a1e1ae6c36dc7a821 100644 (file)
@@ -94,7 +94,7 @@ private:
 
     // Add a button to change background. (right of toolbar)
     mChangeBackgroundButton = Toolkit::PushButton::New();
-    mChangeBackgroundButton.SetBackgroundImage( Image::New( CHANGE_BACKGROUND_ICON ) );
+    mChangeBackgroundButton.SetBackgroundImage( ResourceImage::New( CHANGE_BACKGROUND_ICON ) );
     mChangeBackgroundButton.ClickedSignal().Connect( this, &BubbleEffectExample::OnChangeIconClicked );
     toolBar.AddControl( mChangeBackgroundButton,
                         DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage,
@@ -102,7 +102,7 @@ private:
                         DemoHelper::DEFAULT_MODE_SWITCH_PADDING  );
     // Add a button to change bubble shape. ( left of bar )
     mChangeBubbleShapeButton = Toolkit::PushButton::New();
-    mChangeBubbleShapeButton.SetBackgroundImage( Image::New( CHANGE_BUBBLE_SHAPE_ICON ) );
+    mChangeBubbleShapeButton.SetBackgroundImage( ResourceImage::New( CHANGE_BUBBLE_SHAPE_ICON ) );
     mChangeBubbleShapeButton.ClickedSignal().Connect( this, &BubbleEffectExample::OnChangeIconClicked );
     toolBar.AddControl( mChangeBubbleShapeButton,
                         DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage,
@@ -111,10 +111,10 @@ private:
 
     // Create and initialize the BubbleEmitter object
     mBubbleEmitter = Toolkit::BubbleEmitter::New( stageSize,
-                                                  Image::New( BUBBLE_SHAPE_IMAGES[mCurrentBubbleShapeImageId] ),
+                                                  ResourceImage::New( BUBBLE_SHAPE_IMAGES[mCurrentBubbleShapeImageId] ),
                                                   DEFAULT_NUMBER_OF_BUBBLES,
                                                   DEFAULT_BUBBLE_SIZE);
-    mBackgroundImage = Image::New( BACKGROUND_IMAGES[mCurrentBackgroundImageId] );
+    mBackgroundImage = ResourceImage::New( BACKGROUND_IMAGES[mCurrentBackgroundImageId] );
     mBubbleEmitter.SetBackground( mBackgroundImage, mHSVDelta );
 
     // Get the root actor of all bubbles, and add it to stage.
@@ -235,7 +235,7 @@ private:
   {
     if(button == mChangeBackgroundButton)
     {
-      mBackgroundImage = Image::New( BACKGROUND_IMAGES[ ++mCurrentBackgroundImageId % NUM_BACKGROUND_IMAGES  ] );
+      mBackgroundImage = ResourceImage::New( BACKGROUND_IMAGES[ ++mCurrentBackgroundImageId % NUM_BACKGROUND_IMAGES  ] );
 
       mBubbleEmitter.SetBackground( mBackgroundImage, mHSVDelta );
 
@@ -243,7 +243,7 @@ private:
     }
     else if( button == mChangeBubbleShapeButton )
     {
-      mBubbleEmitter.SetShapeImage( Image::New( BUBBLE_SHAPE_IMAGES[ ++mCurrentBubbleShapeImageId % NUM_BUBBLE_SHAPE_IMAGES ] ) );
+      mBubbleEmitter.SetShapeImage( ResourceImage::New( BUBBLE_SHAPE_IMAGES[ ++mCurrentBubbleShapeImageId % NUM_BUBBLE_SHAPE_IMAGES ] ) );
     }
     return true;
   }
index 327c08c6d10341fb70b4d0c081b563a6a7de3ced..8d04ddf3bc643111a2ba8a404add416f2d5e6925 100644 (file)
@@ -192,8 +192,8 @@ void DissolveEffectApp::OnInit( Application& application )
   mContent = DemoHelper::CreateView( application, mView,mToolBar, "", TOOLBAR_IMAGE, "" );
 
   // Add an effect-changing button on the right of the tool bar.
-  mIconHighP = Image::New( EFFECT_HIGHP_IMAGE );
-  mIconMediumP = Image::New( EFFECT_MEDIUMP_IMAGE );
+  mIconHighP = ResourceImage::New( EFFECT_HIGHP_IMAGE );
+  mIconMediumP = ResourceImage::New( EFFECT_MEDIUMP_IMAGE );
   mEffectChangeButton = Toolkit::PushButton::New();
   mEffectChangeButton.SetBackgroundImage(mIconHighP);
   mEffectChangeButton.ClickedSignal().Connect( this, &DissolveEffectApp::OnEffectButtonClicked );
@@ -206,8 +206,8 @@ void DissolveEffectApp::OnInit( Application& application )
   mToolBar.AddControl( mTitleActor, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarTitlePercentage, Toolkit::Alignment::HorizontalCenter );
 
   // Add an slide-show button on the right of the title
-  mIconPlay = Image::New( PLAY_ICON );
-  mIconStop = Image::New( STOP_ICON );
+  mIconPlay = ResourceImage::New( PLAY_ICON );
+  mIconStop = ResourceImage::New( STOP_ICON );
   mPlayStopButton = Toolkit::PushButton::New();
   mPlayStopButton.SetBackgroundImage( mIconPlay );
   mPlayStopButton.ClickedSignal().Connect( this, &DissolveEffectApp::OnSildeshowButtonClicked );
@@ -229,7 +229,7 @@ void DissolveEffectApp::OnInit( Application& application )
   mSizeConstraint= Constraint::New<Vector3>( Actor::SCALE, LocalSource( Actor::SIZE ), ParentSource( Actor::SIZE ), ScaleToFitKeepAspectRatioConstraint() );
 
   // show the first image
-  mCurrentImage = ImageActor::New( Image::New( IMAGES[mIndex] ) );
+  mCurrentImage = ImageActor::New( ResourceImage::New( IMAGES[mIndex] ) );
   mCurrentImage.SetPositionInheritanceMode(USE_PARENT_POSITION_PLUS_LOCAL_POSITION);
   mCurrentImage.ApplyConstraint( mSizeConstraint );
   mContent.Add(mCurrentImage);
@@ -256,7 +256,7 @@ void DissolveEffectApp::OnPanGesture( Actor actor, const PanGesture& gesture )
       mIndex = (mIndex + NUM_IMAGES -1)%NUM_IMAGES;
     }
 
-    Image image = Image::New( IMAGES[ mIndex ] );
+    Image image = ResourceImage::New( IMAGES[ mIndex ] );
     mNextImage = ImageActor::New( image );
     mNextImage.SetPositionInheritanceMode(USE_PARENT_POSITION_PLUS_LOCAL_POSITION);
     mNextImage.ApplyConstraint( mSizeConstraint );
@@ -368,7 +368,7 @@ bool DissolveEffectApp::OnTimerTick()
   if(mSlideshow)
   {
     mIndex = (mIndex + 1)%NUM_IMAGES;
-    Image image = Image::New( IMAGES[ mIndex ] );
+    Image image = ResourceImage::New( IMAGES[ mIndex ] );
     mNextImage = ImageActor::New( image );
     mNextImage.SetPositionInheritanceMode(USE_PARENT_POSITION_PLUS_LOCAL_POSITION);
     mNextImage.ApplyConstraint( mSizeConstraint );
index f1325cc7491d6f40017acdfbe03214c7df1e0af8..0b3914e7d6953f1f67d9e5037cb94a0c9702ce18 100644 (file)
@@ -318,7 +318,7 @@ private:
 
     // Add a button to change background. (right of toolbar)
     mChangeTextureButton = Toolkit::PushButton::New();
-    mChangeTextureButton.SetBackgroundImage( Image::New( CHANGE_TEXTURE_ICON ) );
+    mChangeTextureButton.SetBackgroundImage( ResourceImage::New( CHANGE_TEXTURE_ICON ) );
     mChangeTextureButton.ClickedSignal().Connect( this, &RefractionEffectExample::OnChangeTexture );
     toolBar.AddControl( mChangeTextureButton,
                         DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage,
@@ -326,7 +326,7 @@ private:
                         DemoHelper::DEFAULT_MODE_SWITCH_PADDING  );
     // Add a button to change mesh pattern. ( left of bar )
     mChangeMeshButton = Toolkit::PushButton::New();
-    mChangeMeshButton.SetBackgroundImage( Image::New( CHANGE_MESH_ICON ) );
+    mChangeMeshButton.SetBackgroundImage( ResourceImage::New( CHANGE_MESH_ICON ) );
     mChangeMeshButton.ClickedSignal().Connect( this, &RefractionEffectExample::OnChangeMesh );
     toolBar.AddControl( mChangeMeshButton,
                         DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage,
@@ -338,7 +338,7 @@ private:
     mNoEffect = NoEffect::New(); // used in the other situations, basic render shader
     // Create the mesh from the obj file and add to stage
     mMaterial =  Material::New( "Material" ) ;
-    mMaterial.SetDiffuseTexture(Image::New(TEXTURE_IMAGES[mCurrentTextureId]));
+    mMaterial.SetDiffuseTexture(ResourceImage::New(TEXTURE_IMAGES[mCurrentTextureId]));
     CreateSurface( MESH_FILES[mCurrentMeshId] );
 
     // Connect the callback to the touch signal on the mesh actor
@@ -371,7 +371,7 @@ private:
   bool OnChangeTexture( Toolkit::Button button )
   {
     mCurrentTextureId = ( mCurrentTextureId + 1 ) % NUM_TEXTURE_IMAGES;
-    mMaterial.SetDiffuseTexture(Image::New(TEXTURE_IMAGES[mCurrentTextureId]));
+    mMaterial.SetDiffuseTexture(ResourceImage::New(TEXTURE_IMAGES[mCurrentTextureId]));
 
     return true;
   }
index 1246be26b2a945667d572da9286931f7a673ff55..eb4985f9fcf99502c7faa04c56491d718be32834 100644 (file)
@@ -148,7 +148,7 @@ public:
                                         "" );
 
     // Add an effect-changing button on the right of the tool bar.
-    Image imageChangeEffect = Image::New( CHANGE_EFFECT_IMAGE );
+    Image imageChangeEffect = ResourceImage::New( CHANGE_EFFECT_IMAGE );
     Toolkit::PushButton effectChangeButton = Toolkit::PushButton::New();
     effectChangeButton.SetBackgroundImage(imageChangeEffect);
     effectChangeButton.ClickedSignal().Connect( this, &TestApp::OnEffectButtonClicked );
@@ -164,7 +164,7 @@ public:
     mTitleActor.SetStyleToCurrentText( DemoHelper::GetDefaultTextStyle() );
 
     //Add a reset button
-    Image resetImage = Image::New( RESET_ICON );
+    Image resetImage = ResourceImage::New( RESET_ICON );
     Toolkit::PushButton resetButton = Toolkit::PushButton::New();
     resetButton.SetBackgroundImage( resetImage );
     resetButton.ClickedSignal().Connect( this, &TestApp::OnResetPressed );
@@ -237,7 +237,7 @@ public:
     mShadowView.SetPointLightFieldOfView( Math::PI / 2.0f);
     mContents.Add(mShadowView);
 
-    Image brickWall = Image::New(DALI_IMAGE_DIR "brick-wall.jpg");
+    Image brickWall = ResourceImage::New(DALI_IMAGE_DIR "brick-wall.jpg");
     mShadowPlaneBg = ImageActor::New(brickWall);
     mShadowPlaneBg.SetParentOrigin(ParentOrigin::CENTER);
     mShadowPlaneBg.SetAnchorPoint(AnchorPoint::CENTER);
index ab9f20c58f9464da03de2b2c66f5e3d5112ccaf3..5c2a77394fa88d6fe9ca2c5629859c83b780851f 100644 (file)
@@ -93,7 +93,7 @@ Dali::Layer CreateToolbar( Dali::Toolkit::ToolBar& toolBar,
   toolBarLayer.RaiseToTop();
 
   // Tool bar
-  Dali::Image image = Dali::Image::New( toolbarImagePath );
+  Dali::Image image = Dali::ResourceImage::New( toolbarImagePath );
   Dali::ImageActor toolBarBackground = Dali::ImageActor::New( image );
   toolBar = Dali::Toolkit::ToolBar::New();
   toolBar.SetBackground( toolBarBackground );
@@ -145,7 +145,7 @@ Dali::Layer CreateView( Dali::Application& application,
   // Set background image.
   if ( ! backgroundImagePath.empty() )
   {
-    Dali::Image backgroundImage = Dali::Image::New( backgroundImagePath );
+    Dali::Image backgroundImage = Dali::ResourceImage::New( backgroundImagePath );
     Dali::ImageActor backgroundImageActor = Dali::ImageActor::New( backgroundImage );
     view.SetBackground( backgroundImageActor );
   }
index bd0d0a7428efc238c2bd7e79b2637b70642d23f8..f75e541303d67fa08adddba12f9633f5b478500f 100644 (file)
@@ -120,7 +120,7 @@ private:
    * Start the transition
    * @param[in] image The image content of the imageActor for transition
    */
-  void OnImageLoaded(Image image);
+  void OnImageLoaded(ResourceImage image);
   /**
    * Main key event handler
    */
@@ -209,9 +209,9 @@ void CubeTransitionApp::OnInit( Application& application )
   mContent = DemoHelper::CreateView( application, mView, mToolBar, "", TOOLBAR_IMAGE, "" );
 
   // Add an effect-changing button on the right of the tool bar.
-  mImageWave = Image::New( EFFECT_WAVE_IMAGE );
-  mImageCross = Image::New( EFFECT_CROSS_IMAGE );
-  mImageFold = Image::New( EFFECT_FOLD_IMAGE );
+  mImageWave = ResourceImage::New( EFFECT_WAVE_IMAGE );
+  mImageCross = ResourceImage::New( EFFECT_CROSS_IMAGE );
+  mImageFold = ResourceImage::New( EFFECT_FOLD_IMAGE );
   mEffectChangeButton = Toolkit::PushButton::New();
   mEffectChangeButton.SetBackgroundImage(mImageWave);
   mEffectChangeButton.ClickedSignal().Connect( this, &CubeTransitionApp::OnEffectButtonClicked );
@@ -222,8 +222,8 @@ void CubeTransitionApp::OnInit( Application& application )
   mToolBar.AddControl( mTitleActor, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarTitlePercentage, Toolkit::Alignment::HorizontalCenter );
 
   //Add an slideshow icon on the right of the title
-  mIconSlideshowStart = Image::New( SLIDE_SHOW_START_ICON );
-  mIconSlideshowStop = Image::New( SLIDE_SHOW_STOP_ICON );
+  mIconSlideshowStart = ResourceImage::New( SLIDE_SHOW_START_ICON );
+  mIconSlideshowStop = ResourceImage::New( SLIDE_SHOW_STOP_ICON );
   mSlideshowButton = Toolkit::PushButton::New();
   mSlideshowButton.SetBackgroundImage( mIconSlideshowStart );
   mSlideshowButton.ClickedSignal().Connect( this, &CubeTransitionApp::OnSildeshowButtonClicked );
@@ -266,7 +266,7 @@ void CubeTransitionApp::OnInit( Application& application )
   // show the first image
   mImageConstraint = Constraint::New<Vector3>( Actor::SCALE, LocalSource( Actor::SIZE ), ParentSource( Actor::SIZE ), ScaleToFitKeepAspectRatioConstraint() );
 
-  mCurrentImage = ImageActor::New( Image::New( IMAGES[mIndex] ) );
+  mCurrentImage = ImageActor::New( ResourceImage::New( IMAGES[mIndex] ) );
   mCurrentImage.SetPositionInheritanceMode( USE_PARENT_POSITION );
   mCurrentImage.ApplyConstraint( mImageConstraint );
   mParent.Add( mCurrentImage );
@@ -308,23 +308,24 @@ void CubeTransitionApp::OnPanGesture( Actor actor, const PanGesture& gesture )
 
 void CubeTransitionApp::GoToNextImage()
 {
-  Image image = Image::New( IMAGES[ mIndex ] );
+  ResourceImage image = ResourceImage::New( IMAGES[ mIndex ] );
   mNextImage = ImageActor::New( image );
   mNextImage.SetPositionInheritanceMode(USE_PARENT_POSITION);
   mNextImage.ApplyConstraint( mImageConstraint );
   mCurrentEffect.SetTargetImage(mNextImage);
-  mIsImageLoading = true;
   if( image.GetLoadingState() == ResourceLoadingSucceeded )
   {
-      OnImageLoaded( image );
+    mIsImageLoading = false;
+    OnImageLoaded( image );
   }
   else
   {
+    mIsImageLoading = true;
     image.LoadingFinishedSignal().Connect( this, &CubeTransitionApp::OnImageLoaded );
   }
 }
 
-void CubeTransitionApp::OnImageLoaded(Image image)
+void CubeTransitionApp::OnImageLoaded(ResourceImage image)
 {
    mIsImageLoading = false;
    mCurrentEffect.StartTransition( mPanPosition, mPanDisplacement );