Commit fcd958ebbc2723b0b47843a5978b5f4126387656
1 parent
6a6fbb2b
update demos with ResourceImage/Image split
Change-Id: Ifdee5c061cedaf271fac15479a6e403ef161d527
Showing
21 changed files
with
141 additions
and
141 deletions
demo/dali-table-view.cpp
| ... | ... | @@ -120,7 +120,7 @@ TextStyle GetTableTextStyle() |
| 120 | 120 | */ |
| 121 | 121 | ImageActor CreateBackground( std::string imagePath ) |
| 122 | 122 | { |
| 123 | - Image image = Image::New( imagePath ); | |
| 123 | + Image image = ResourceImage::New( imagePath ); | |
| 124 | 124 | ImageActor background = ImageActor::New( image ); |
| 125 | 125 | |
| 126 | 126 | background.SetAnchorPoint( AnchorPoint::CENTER ); |
| ... | ... | @@ -516,7 +516,7 @@ Actor DaliTableView::CreateTile( const std::string& name, const std::string& tit |
| 516 | 516 | // create background image |
| 517 | 517 | if( addBackground ) |
| 518 | 518 | { |
| 519 | - Image bg = Image::New( TILE_BACKGROUND ); | |
| 519 | + Image bg = ResourceImage::New( TILE_BACKGROUND ); | |
| 520 | 520 | ImageActor image = ImageActor::New( bg ); |
| 521 | 521 | image.SetAnchorPoint( AnchorPoint::CENTER ); |
| 522 | 522 | image.SetParentOrigin( ParentOrigin::CENTER ); |
| ... | ... | @@ -562,7 +562,7 @@ Actor DaliTableView::CreateTile( const std::string& name, const std::string& tit |
| 562 | 562 | |
| 563 | 563 | ImageActor DaliTableView::NewStencilImage() |
| 564 | 564 | { |
| 565 | - Image alpha = Image::New( TILE_BACKGROUND_ALPHA ); | |
| 565 | + Image alpha = ResourceImage::New( TILE_BACKGROUND_ALPHA ); | |
| 566 | 566 | |
| 567 | 567 | ImageActor stencilActor = ImageActor::New( alpha ); |
| 568 | 568 | stencilActor.SetStyle( ImageActor::STYLE_NINE_PATCH ); |
| ... | ... | @@ -908,7 +908,7 @@ void DaliTableView::GenerateCircle( const Size& size, std::vector< unsigned char |
| 908 | 908 | |
| 909 | 909 | ImageActor DaliTableView::CreateLogo( std::string imagePath ) |
| 910 | 910 | { |
| 911 | - Image image = Image::New( imagePath ); | |
| 911 | + Image image = ResourceImage::New( imagePath ); | |
| 912 | 912 | ImageActor logo = ImageActor::New( image ); |
| 913 | 913 | |
| 914 | 914 | logo.SetAnchorPoint( AnchorPoint::CENTER ); | ... | ... |
demo/scripts/table-view.json
examples/blocks/blocks-example.cpp
| ... | ... | @@ -591,7 +591,7 @@ private: |
| 591 | 591 | ImageAttributes attr; |
| 592 | 592 | attr.SetSize( 128, 64 ); |
| 593 | 593 | attr.SetScalingMode( ImageAttributes::ScaleToFill ); |
| 594 | - Image img = Image::New(BRICK_IMAGE_PATH[type], attr); | |
| 594 | + Image img = ResourceImage::New(BRICK_IMAGE_PATH[type], attr); | |
| 595 | 595 | ImageActor brick = ImageActor::New(img); |
| 596 | 596 | brick.SetParentOrigin(ParentOrigin::TOP_LEFT); |
| 597 | 597 | brick.SetAnchorPoint(AnchorPoint::CENTER); |
| ... | ... | @@ -623,7 +623,7 @@ private: |
| 623 | 623 | */ |
| 624 | 624 | ImageActor CreateImage(const std::string& filename) |
| 625 | 625 | { |
| 626 | - Image img = Image::New(filename); | |
| 626 | + Image img = ResourceImage::New(filename); | |
| 627 | 627 | ImageActor actor = ImageActor::New(img); |
| 628 | 628 | actor.SetParentOrigin(ParentOrigin::TOP_LEFT); |
| 629 | 629 | actor.SetAnchorPoint(AnchorPoint::CENTER); | ... | ... |
examples/builder/examples.cpp
| ... | ... | @@ -532,7 +532,7 @@ public: |
| 532 | 532 | |
| 533 | 533 | // Create an edit mode button. (left of toolbar) |
| 534 | 534 | Toolkit::PushButton editButton = Toolkit::PushButton::New(); |
| 535 | - editButton.SetBackgroundImage( Image::New( EDIT_IMAGE ) ); | |
| 535 | + editButton.SetBackgroundImage( ResourceImage::New( EDIT_IMAGE ) ); | |
| 536 | 536 | editButton.ClickedSignal().Connect( this, &ExampleApp::OnToolSelectLayout); |
| 537 | 537 | editButton.SetLeaveRequired( true ); |
| 538 | 538 | mToolBar.AddControl( editButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalLeft, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); | ... | ... |
examples/buttons/buttons-example.cpp
| ... | ... | @@ -142,7 +142,7 @@ class ButtonsController: public ConnectionTracker |
| 142 | 142 | |
| 143 | 143 | // Radio 1 |
| 144 | 144 | { |
| 145 | - ImageActor imageActor = ImageActor::New( Image::New( SMALL_IMAGE_1 ) ); | |
| 145 | + ImageActor imageActor = ImageActor::New( ResourceImage::New( SMALL_IMAGE_1 ) ); | |
| 146 | 146 | imageActor.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ); |
| 147 | 147 | mRadioButtonImage1 = Dali::Toolkit::RadioButton::New( imageActor ); |
| 148 | 148 | mRadioButtonImage1.SetParentOrigin( ParentOrigin::TOP_LEFT ); |
| ... | ... | @@ -157,7 +157,7 @@ class ButtonsController: public ConnectionTracker |
| 157 | 157 | { |
| 158 | 158 | radioY += RADIO_LABEL_THUMBNAIL_SIZE + RADIO_IMAGE_SPACING; |
| 159 | 159 | |
| 160 | - ImageActor imageActor = ImageActor::New( Image::New( SMALL_IMAGE_2 ) ); | |
| 160 | + ImageActor imageActor = ImageActor::New( ResourceImage::New( SMALL_IMAGE_2 ) ); | |
| 161 | 161 | imageActor.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ); |
| 162 | 162 | |
| 163 | 163 | mRadioButtonImage2 = Dali::Toolkit::RadioButton::New( imageActor ); |
| ... | ... | @@ -172,7 +172,7 @@ class ButtonsController: public ConnectionTracker |
| 172 | 172 | { |
| 173 | 173 | radioY += RADIO_LABEL_THUMBNAIL_SIZE + RADIO_IMAGE_SPACING; |
| 174 | 174 | |
| 175 | - ImageActor imageActor = ImageActor::New( Image::New( SMALL_IMAGE_3 ) ); | |
| 175 | + ImageActor imageActor = ImageActor::New( ResourceImage::New( SMALL_IMAGE_3 ) ); | |
| 176 | 176 | imageActor.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ); |
| 177 | 177 | |
| 178 | 178 | mRadioButtonImage3 = Dali::Toolkit::RadioButton::New( imageActor ); |
| ... | ... | @@ -191,18 +191,18 @@ class ButtonsController: public ConnectionTracker |
| 191 | 191 | mUpdateButton.SetLabel("Select"); |
| 192 | 192 | mUpdateButton.SetSize( DP(100), DP(BUTTON_HEIGHT) ); |
| 193 | 193 | |
| 194 | - mUpdateButton.SetSelectedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) ); | |
| 195 | - mUpdateButton.SetDisabledImage( Dali::Image::New( PUSHBUTTON_DISABLED_IMAGE ) ); | |
| 196 | - mUpdateButton.SetButtonImage( Dali::Image::New( PUSHBUTTON_BUTTON_IMAGE ) ); | |
| 194 | + mUpdateButton.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); | |
| 195 | + mUpdateButton.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) ); | |
| 196 | + mUpdateButton.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); | |
| 197 | 197 | |
| 198 | 198 | mUpdateButton.ClickedSignal().Connect( this, &ButtonsController::OnButtonClicked ); |
| 199 | 199 | |
| 200 | 200 | radioButtonsGroup2.Add(mUpdateButton); |
| 201 | 201 | |
| 202 | 202 | // ImageActor to display selected image |
| 203 | - mBigImage1 = Image::New( BIG_IMAGE_1 ); | |
| 204 | - mBigImage2 = Image::New( BIG_IMAGE_2 ); | |
| 205 | - mBigImage3 = Image::New( BIG_IMAGE_3 ); | |
| 203 | + mBigImage1 = ResourceImage::New( BIG_IMAGE_1 ); | |
| 204 | + mBigImage2 = ResourceImage::New( BIG_IMAGE_2 ); | |
| 205 | + mBigImage3 = ResourceImage::New( BIG_IMAGE_3 ); | |
| 206 | 206 | |
| 207 | 207 | mImage = ImageActor::New( mBigImage1 ); |
| 208 | 208 | mImage.SetParentOrigin( ParentOrigin::TOP_RIGHT ); |
| ... | ... | @@ -239,7 +239,7 @@ class ButtonsController: public ConnectionTracker |
| 239 | 239 | alignment.Add( textView ); |
| 240 | 240 | tableView.AddChild( alignment, Toolkit::TableView::CellPosition( 0, 0 ) ); |
| 241 | 241 | |
| 242 | - ImageActor imageActor = ImageActor::New( Image::New( ENABLED_IMAGE ) ); | |
| 242 | + ImageActor imageActor = ImageActor::New( ResourceImage::New( ENABLED_IMAGE ) ); | |
| 243 | 243 | imageActor.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ); |
| 244 | 244 | tableView.AddChild( imageActor, Toolkit::TableView::CellPosition( 0, 1 ) ); |
| 245 | 245 | tableView.SetFixedWidth( 1, DP(RADIO_LABEL_THUMBNAIL_SIZE) ); |
| ... | ... | @@ -279,8 +279,8 @@ class ButtonsController: public ConnectionTracker |
| 279 | 279 | checkBoxBackground.SetSize( DP(430), DP(GROUP3_HEIGHT) ); |
| 280 | 280 | mContentLayer.Add( checkBoxBackground ); |
| 281 | 281 | |
| 282 | - Dali::Image unselected = Dali::Image::New( CHECKBOX_UNSELECTED_IMAGE ); | |
| 283 | - Dali::Image selected = Dali::Image::New( CHECKBOX_SELECTED_IMAGE ); | |
| 282 | + Dali::Image unselected = Dali::ResourceImage::New( CHECKBOX_UNSELECTED_IMAGE ); | |
| 283 | + Dali::Image selected = Dali::ResourceImage::New( CHECKBOX_SELECTED_IMAGE ); | |
| 284 | 284 | |
| 285 | 285 | int checkYPos = MARGIN_SIZE; |
| 286 | 286 | |
| ... | ... | @@ -368,9 +368,9 @@ class ButtonsController: public ConnectionTracker |
| 368 | 368 | toggleButton.SetLabel( "Unselected" ); |
| 369 | 369 | toggleButton.SetSize( DP(150), DP(BUTTON_HEIGHT) ); |
| 370 | 370 | |
| 371 | - toggleButton.SetSelectedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) ); | |
| 372 | - toggleButton.SetDisabledImage( Dali::Image::New( PUSHBUTTON_DISABLED_IMAGE ) ); | |
| 373 | - toggleButton.SetButtonImage( Dali::Image::New( PUSHBUTTON_BUTTON_IMAGE ) ); | |
| 371 | + toggleButton.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); | |
| 372 | + toggleButton.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) ); | |
| 373 | + toggleButton.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); | |
| 374 | 374 | |
| 375 | 375 | toggleButton.StateChangedSignal().Connect( this, &ButtonsController::OnButtonSelected ); |
| 376 | 376 | ... | ... |
examples/cluster/cluster-example.cpp
| ... | ... | @@ -493,10 +493,10 @@ public: |
| 493 | 493 | "" ); |
| 494 | 494 | |
| 495 | 495 | // Create a effect toggle button. (right of toolbar) |
| 496 | - mLayoutButtonImages[ NO_EFFECT ] = Image::New( LAYOUT_NONE_IMAGE ); | |
| 497 | - mLayoutButtonImages[ WOBBLE_EFFECT ] = Image::New( LAYOUT_WOBBLE_IMAGE ); | |
| 498 | - mLayoutButtonImages[ CAROUSEL_EFFECT ] = Image::New( LAYOUT_CAROUSEL_IMAGE ); | |
| 499 | - mLayoutButtonImages[ SPHERE_EFFECT ] = Image::New( LAYOUT_SPHERE_IMAGE ); | |
| 496 | + mLayoutButtonImages[ NO_EFFECT ] = ResourceImage::New( LAYOUT_NONE_IMAGE ); | |
| 497 | + mLayoutButtonImages[ WOBBLE_EFFECT ] = ResourceImage::New( LAYOUT_WOBBLE_IMAGE ); | |
| 498 | + mLayoutButtonImages[ CAROUSEL_EFFECT ] = ResourceImage::New( LAYOUT_CAROUSEL_IMAGE ); | |
| 499 | + mLayoutButtonImages[ SPHERE_EFFECT ] = ResourceImage::New( LAYOUT_SPHERE_IMAGE ); | |
| 500 | 500 | |
| 501 | 501 | mLayoutButton = Toolkit::PushButton::New(); |
| 502 | 502 | mLayoutButton.ClickedSignal().Connect( this, &ClusterController::OnEffectTouched ); |
| ... | ... | @@ -525,7 +525,7 @@ public: |
| 525 | 525 | mContentLayer.Add(mScrollView); |
| 526 | 526 | |
| 527 | 527 | // Create the image border shared by all the cluster image actors |
| 528 | - mClusterBorderImage = Image::New(CLUSTER_BORDER_IMAGE_PATH); | |
| 528 | + mClusterBorderImage = ResourceImage::New(CLUSTER_BORDER_IMAGE_PATH); | |
| 529 | 529 | |
| 530 | 530 | AddCluster( PEOPLE, ClusterStyleStandard::New(ClusterStyleStandard::ClusterStyle1) ); |
| 531 | 531 | AddCluster( TODAY, ClusterStyleStandard::New(ClusterStyleStandard::ClusterStyle2) ); |
| ... | ... | @@ -556,7 +556,7 @@ public: |
| 556 | 556 | DALI_ASSERT_ALWAYS(paths); |
| 557 | 557 | |
| 558 | 558 | // Add a background image to the cluster |
| 559 | - Image bg = Image::New( CLUSTER_BACKGROUND_IMAGE_PATH ); | |
| 559 | + Image bg = ResourceImage::New( CLUSTER_BACKGROUND_IMAGE_PATH ); | |
| 560 | 560 | ImageActor image = ImageActor::New(bg); |
| 561 | 561 | clusterActor.SetBackgroundImage(image); |
| 562 | 562 | |
| ... | ... | @@ -590,7 +590,7 @@ public: |
| 590 | 590 | attribs.SetPixelFormat( Pixel::RGB888 ); |
| 591 | 591 | |
| 592 | 592 | // Add a shadow image child actor |
| 593 | - Image shadowImage = Image::New( CLUSTER_SHADOW_IMAGE_PATH, attribs ); | |
| 593 | + Image shadowImage = ResourceImage::New( CLUSTER_SHADOW_IMAGE_PATH, attribs ); | |
| 594 | 594 | ImageActor shadowActor = ImageActor::New(shadowImage); |
| 595 | 595 | |
| 596 | 596 | // Shadow is not exactly located on the center of the image, so it is moved to a little |
| ... | ... | @@ -605,7 +605,7 @@ public: |
| 605 | 605 | actor.Add( shadowActor ); |
| 606 | 606 | |
| 607 | 607 | // Add a picture image actor to actor (with equal size to the parent). |
| 608 | - Image image = Image::New( imagePath, attribs ); | |
| 608 | + Image image = ResourceImage::New( imagePath, attribs ); | |
| 609 | 609 | ImageActor imageActor = ImageActor::New( image ); |
| 610 | 610 | imageActor.SetParentOrigin( ParentOrigin::CENTER ); |
| 611 | 611 | imageActor.SetAnchorPoint( AnchorPoint::CENTER ); | ... | ... |
examples/image/image-scaling-irregular-grid/image-scaling-irregular-grid-example.cpp
| ... | ... | @@ -182,7 +182,7 @@ Image CreateImage(const std::string& filename, unsigned int width, unsigned int |
| 182 | 182 | |
| 183 | 183 | attributes.SetSize( width, height ); |
| 184 | 184 | attributes.SetScalingMode( scalingMode ); |
| 185 | - Image image = Image::New( filename, attributes ); | |
| 185 | + Image image = ResourceImage::New( filename, attributes ); | |
| 186 | 186 | return image; |
| 187 | 187 | } |
| 188 | 188 | |
| ... | ... | @@ -307,7 +307,7 @@ public: |
| 307 | 307 | "" ); |
| 308 | 308 | |
| 309 | 309 | // Create an image scaling toggle button. (right of toolbar) |
| 310 | - Image toggleScalingImage = Image::New( TOGGLE_SCALING_IMAGE ); | |
| 310 | + Image toggleScalingImage = ResourceImage::New( TOGGLE_SCALING_IMAGE ); | |
| 311 | 311 | Toolkit::PushButton toggleScalingButton = Toolkit::PushButton::New(); |
| 312 | 312 | toggleScalingButton.SetBackgroundImage( toggleScalingImage ); |
| 313 | 313 | toggleScalingButton.ClickedSignal().Connect( this, &ImageScalingIrregularGridController::OnToggleScalingTouched ); |
| ... | ... | @@ -472,7 +472,7 @@ public: |
| 472 | 472 | |
| 473 | 473 | ImageActor imageActor = ImageActor::DownCast( actor ); |
| 474 | 474 | Image oldImage = imageActor.GetImage(); |
| 475 | - Image newImage = CreateImage( oldImage.GetFilename(), imageSize.width + 0.5f, imageSize.height + 0.5f, newMode ); | |
| 475 | + Image newImage = CreateImage( ResourceImage::DownCast(oldImage).GetUrl(), imageSize.width + 0.5f, imageSize.height + 0.5f, newMode ); | |
| 476 | 476 | imageActor.SetImage( newImage ); |
| 477 | 477 | mScalingModes[id] = newMode; |
| 478 | 478 | } |
| ... | ... | @@ -514,7 +514,7 @@ public: |
| 514 | 514 | const Vector2 imageSize = mSizes[gridImageActor.GetId()]; |
| 515 | 515 | ImageAttributes::ScalingMode newMode = NextMode( mScalingModes[gridImageActor.GetId()] ); |
| 516 | 516 | Image oldImage = gridImageActor.GetImage(); |
| 517 | - Image newImage = CreateImage( oldImage.GetFilename(), imageSize.width, imageSize.height, newMode ); | |
| 517 | + Image newImage = CreateImage(ResourceImage::DownCast(oldImage).GetUrl(), imageSize.width, imageSize.height, newMode ); | |
| 518 | 518 | gridImageActor.SetImage( newImage ); |
| 519 | 519 | |
| 520 | 520 | mScalingModes[gridImageActor.GetId()] = newMode; | ... | ... |
examples/item-view/item-view-example.cpp
| ... | ... | @@ -251,7 +251,7 @@ public: |
| 251 | 251 | Vector2 stageSize = Stage::GetCurrent().GetSize(); |
| 252 | 252 | |
| 253 | 253 | // Create a border image shared by all the item actors |
| 254 | - mBorderImage = Image::New(ITEM_BORDER_IMAGE_PATH); | |
| 254 | + mBorderImage = ResourceImage::New(ITEM_BORDER_IMAGE_PATH); | |
| 255 | 255 | |
| 256 | 256 | // Creates a default view with a default tool bar. |
| 257 | 257 | // The view is added to the stage. |
| ... | ... | @@ -266,14 +266,14 @@ public: |
| 266 | 266 | |
| 267 | 267 | // Create an edit mode button. (left of toolbar) |
| 268 | 268 | Toolkit::PushButton editButton = Toolkit::PushButton::New(); |
| 269 | - editButton.SetBackgroundImage( Image::New( EDIT_IMAGE ) ); | |
| 269 | + editButton.SetBackgroundImage( ResourceImage::New( EDIT_IMAGE ) ); | |
| 270 | 270 | editButton.ClickedSignal().Connect( this, &ItemViewExample::OnModeButtonClicked); |
| 271 | 271 | editButton.SetLeaveRequired( true ); |
| 272 | 272 | mToolBar.AddControl( editButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalLeft, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); |
| 273 | 273 | |
| 274 | 274 | // Create a layout toggle button. (right of toolbar) |
| 275 | 275 | mLayoutButton = Toolkit::PushButton::New(); |
| 276 | - mLayoutButton.SetBackgroundImage( Image::New( SPIRAL_LAYOUT_IMAGE ) ); | |
| 276 | + mLayoutButton.SetBackgroundImage( ResourceImage::New( SPIRAL_LAYOUT_IMAGE ) ); | |
| 277 | 277 | mLayoutButton.ClickedSignal().Connect( this, &ItemViewExample::OnLayoutButtonClicked); |
| 278 | 278 | mLayoutButton.SetLeaveRequired( true ); |
| 279 | 279 | mToolBar.AddControl( mLayoutButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); |
| ... | ... | @@ -284,8 +284,8 @@ public: |
| 284 | 284 | mDeleteButton.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT); |
| 285 | 285 | mDeleteButton.SetPosition( BUTTON_BORDER, BUTTON_BORDER ); |
| 286 | 286 | mDeleteButton.SetDrawMode( DrawMode::OVERLAY ); |
| 287 | - mDeleteButton.SetBackgroundImage( Image::New( TOOLBAR_IMAGE ) ); | |
| 288 | - mDeleteButton.SetButtonImage( Image::New( DELETE_IMAGE ) ); | |
| 287 | + mDeleteButton.SetBackgroundImage( ResourceImage::New( TOOLBAR_IMAGE ) ); | |
| 288 | + mDeleteButton.SetButtonImage( ResourceImage::New( DELETE_IMAGE ) ); | |
| 289 | 289 | mDeleteButton.SetSize( stageSize.width * 0.15f, stageSize.width * 0.15f ); |
| 290 | 290 | mDeleteButton.ClickedSignal().Connect( this, &ItemViewExample::OnDeleteButtonClicked); |
| 291 | 291 | mDeleteButton.SetLeaveRequired( true ); |
| ... | ... | @@ -298,8 +298,8 @@ public: |
| 298 | 298 | mInsertButton.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT); |
| 299 | 299 | mInsertButton.SetPosition( BUTTON_BORDER, BUTTON_BORDER ); |
| 300 | 300 | mInsertButton.SetDrawMode( DrawMode::OVERLAY ); |
| 301 | - mInsertButton.SetBackgroundImage( Image::New( TOOLBAR_IMAGE ) ); | |
| 302 | - mInsertButton.SetButtonImage( Image::New( INSERT_IMAGE ) ); | |
| 301 | + mInsertButton.SetBackgroundImage( ResourceImage::New( TOOLBAR_IMAGE ) ); | |
| 302 | + mInsertButton.SetButtonImage( ResourceImage::New( INSERT_IMAGE ) ); | |
| 303 | 303 | mInsertButton.SetSize( stageSize.width * 0.15f, stageSize.width * 0.15f ); |
| 304 | 304 | mInsertButton.ClickedSignal().Connect( this, &ItemViewExample::OnInsertButtonClicked); |
| 305 | 305 | mInsertButton.SetLeaveRequired( true ); |
| ... | ... | @@ -312,8 +312,8 @@ public: |
| 312 | 312 | mReplaceButton.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT); |
| 313 | 313 | mReplaceButton.SetPosition( BUTTON_BORDER, BUTTON_BORDER ); |
| 314 | 314 | mReplaceButton.SetDrawMode( DrawMode::OVERLAY ); |
| 315 | - mReplaceButton.SetBackgroundImage( Image::New( TOOLBAR_IMAGE ) ); | |
| 316 | - mReplaceButton.SetButtonImage( Image::New( REPLACE_IMAGE ) ); | |
| 315 | + mReplaceButton.SetBackgroundImage( ResourceImage::New( TOOLBAR_IMAGE ) ); | |
| 316 | + mReplaceButton.SetButtonImage( ResourceImage::New( REPLACE_IMAGE ) ); | |
| 317 | 317 | mReplaceButton.SetSize( stageSize.width * 0.15f, stageSize.width * 0.15f ); |
| 318 | 318 | mReplaceButton.ClickedSignal().Connect( this, &ItemViewExample::OnReplaceButtonClicked); |
| 319 | 319 | mReplaceButton.SetLeaveRequired( true ); |
| ... | ... | @@ -844,19 +844,19 @@ public: |
| 844 | 844 | { |
| 845 | 845 | case SPIRAL_LAYOUT: |
| 846 | 846 | { |
| 847 | - mLayoutButton.SetBackgroundImage( Image::New( SPIRAL_LAYOUT_IMAGE ) ); | |
| 847 | + mLayoutButton.SetBackgroundImage( ResourceImage::New( SPIRAL_LAYOUT_IMAGE ) ); | |
| 848 | 848 | break; |
| 849 | 849 | } |
| 850 | 850 | |
| 851 | 851 | case GRID_LAYOUT: |
| 852 | 852 | { |
| 853 | - mLayoutButton.SetBackgroundImage( Image::New( GRID_LAYOUT_IMAGE ) ); | |
| 853 | + mLayoutButton.SetBackgroundImage( ResourceImage::New( GRID_LAYOUT_IMAGE ) ); | |
| 854 | 854 | break; |
| 855 | 855 | } |
| 856 | 856 | |
| 857 | 857 | case DEPTH_LAYOUT: |
| 858 | 858 | { |
| 859 | - mLayoutButton.SetBackgroundImage( Image::New( DEPTH_LAYOUT_IMAGE ) ); | |
| 859 | + mLayoutButton.SetBackgroundImage( ResourceImage::New( DEPTH_LAYOUT_IMAGE ) ); | |
| 860 | 860 | break; |
| 861 | 861 | } |
| 862 | 862 | |
| ... | ... | @@ -885,7 +885,7 @@ public: // From ItemFactory |
| 885 | 885 | virtual Actor NewItem(unsigned int itemId) |
| 886 | 886 | { |
| 887 | 887 | // Create an image actor for this item |
| 888 | - Image image = Image::New( IMAGE_PATHS[itemId % NUM_IMAGES] ); | |
| 888 | + Image image = ResourceImage::New( IMAGE_PATHS[itemId % NUM_IMAGES] ); | |
| 889 | 889 | Actor actor = ImageActor::New(image); |
| 890 | 890 | actor.SetPosition( INITIAL_OFFSCREEN_POSITION ); |
| 891 | 891 | |
| ... | ... | @@ -924,7 +924,7 @@ public: // From ItemFactory |
| 924 | 924 | } |
| 925 | 925 | actor.Add( checkbox ); |
| 926 | 926 | |
| 927 | - ImageActor tick = ImageActor::New( Image::New(SELECTED_IMAGE) ); | |
| 927 | + ImageActor tick = ImageActor::New( ResourceImage::New(SELECTED_IMAGE) ); | |
| 928 | 928 | tick.SetColorMode( USE_OWN_COLOR ); |
| 929 | 929 | tick.SetName( "Tick" ); |
| 930 | 930 | tick.SetParentOrigin( ParentOrigin::TOP_RIGHT ); | ... | ... |
examples/logging/logging-example.cpp
| ... | ... | @@ -286,9 +286,9 @@ class LoggingController: public ConnectionTracker |
| 286 | 286 | button.SetPosition( buttonXDP, 0 ); |
| 287 | 287 | button.SetSize( buttonWidthDP, DP(BUTTON_HEIGHT) ); |
| 288 | 288 | |
| 289 | - button.SetSelectedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) ); | |
| 290 | - button.SetButtonImage( Dali::Image::New( PUSHBUTTON_BUTTON_IMAGE ) ); | |
| 291 | - button.SetDisabledImage( Dali::Image::New( PUSHBUTTON_DISABLED_IMAGE ) ); | |
| 289 | + button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); | |
| 290 | + button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); | |
| 291 | + button.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) ); | |
| 292 | 292 | |
| 293 | 293 | button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked ); |
| 294 | 294 | |
| ... | ... | @@ -306,9 +306,9 @@ class LoggingController: public ConnectionTracker |
| 306 | 306 | button.SetPosition( buttonXDP, 0 ); |
| 307 | 307 | button.SetSize( buttonWidthDP, DP(BUTTON_HEIGHT) ); |
| 308 | 308 | |
| 309 | - button.SetSelectedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) ); | |
| 310 | - button.SetButtonImage( Dali::Image::New( PUSHBUTTON_BUTTON_IMAGE ) ); | |
| 311 | - button.SetDisabledImage( Dali::Image::New( PUSHBUTTON_DISABLED_IMAGE ) ); | |
| 309 | + button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); | |
| 310 | + button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); | |
| 311 | + button.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) ); | |
| 312 | 312 | |
| 313 | 313 | button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked ); |
| 314 | 314 | |
| ... | ... | @@ -337,9 +337,9 @@ class LoggingController: public ConnectionTracker |
| 337 | 337 | button.SetPosition( buttonXDP, 0 ); |
| 338 | 338 | button.SetSize( buttonWidthDP, DP(BUTTON_HEIGHT) ); |
| 339 | 339 | |
| 340 | - button.SetSelectedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) ); | |
| 341 | - button.SetButtonImage( Dali::Image::New( PUSHBUTTON_BUTTON_IMAGE ) ); | |
| 342 | - button.SetDisabledImage( Dali::Image::New( PUSHBUTTON_DISABLED_IMAGE ) ); | |
| 340 | + button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); | |
| 341 | + button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); | |
| 342 | + button.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) ); | |
| 343 | 343 | |
| 344 | 344 | button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked ); |
| 345 | 345 | |
| ... | ... | @@ -357,9 +357,9 @@ class LoggingController: public ConnectionTracker |
| 357 | 357 | button.SetPosition( buttonXDP, 0 ); |
| 358 | 358 | button.SetSize( buttonWidthDP, DP(BUTTON_HEIGHT) ); |
| 359 | 359 | |
| 360 | - button.SetSelectedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) ); | |
| 361 | - button.SetButtonImage( Dali::Image::New( PUSHBUTTON_BUTTON_IMAGE ) ); | |
| 362 | - button.SetDisabledImage( Dali::Image::New( PUSHBUTTON_DISABLED_IMAGE ) ); | |
| 360 | + button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); | |
| 361 | + button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); | |
| 362 | + button.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) ); | |
| 363 | 363 | |
| 364 | 364 | button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked ); |
| 365 | 365 | |
| ... | ... | @@ -388,9 +388,9 @@ class LoggingController: public ConnectionTracker |
| 388 | 388 | button.SetPosition( buttonXDP, 0 ); |
| 389 | 389 | button.SetSize( buttonWidthDP, DP(BUTTON_HEIGHT) ); |
| 390 | 390 | |
| 391 | - button.SetSelectedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) ); | |
| 392 | - button.SetButtonImage( Dali::Image::New( PUSHBUTTON_BUTTON_IMAGE ) ); | |
| 393 | - button.SetDisabledImage( Dali::Image::New( PUSHBUTTON_DISABLED_IMAGE ) ); | |
| 391 | + button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); | |
| 392 | + button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); | |
| 393 | + button.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) ); | |
| 394 | 394 | |
| 395 | 395 | button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked ); |
| 396 | 396 | |
| ... | ... | @@ -408,9 +408,9 @@ class LoggingController: public ConnectionTracker |
| 408 | 408 | button.SetPosition( buttonXDP, 0 ); |
| 409 | 409 | button.SetSize( buttonWidthDP, DP(BUTTON_HEIGHT) ); |
| 410 | 410 | |
| 411 | - button.SetSelectedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) ); | |
| 412 | - button.SetButtonImage( Dali::Image::New( PUSHBUTTON_BUTTON_IMAGE ) ); | |
| 413 | - button.SetDisabledImage( Dali::Image::New( PUSHBUTTON_DISABLED_IMAGE ) ); | |
| 411 | + button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); | |
| 412 | + button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); | |
| 413 | + button.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) ); | |
| 414 | 414 | |
| 415 | 415 | button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked ); |
| 416 | 416 | |
| ... | ... | @@ -520,9 +520,9 @@ class LoggingController: public ConnectionTracker |
| 520 | 520 | button.SetPosition( buttonXDP, 0 ); |
| 521 | 521 | button.SetSize( buttonWidthDP, DP(BUTTON_HEIGHT) ); |
| 522 | 522 | |
| 523 | - button.SetSelectedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) ); | |
| 524 | - button.SetButtonImage( Dali::Image::New( PUSHBUTTON_BUTTON_IMAGE ) ); | |
| 525 | - button.SetDisabledImage( Dali::Image::New( PUSHBUTTON_DISABLED_IMAGE ) ); | |
| 523 | + button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); | |
| 524 | + button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); | |
| 525 | + button.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) ); | |
| 526 | 526 | |
| 527 | 527 | button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked ); |
| 528 | 528 | ... | ... |
examples/motion/motion-blur-example.cpp
| ... | ... | @@ -149,8 +149,8 @@ public: |
| 149 | 149 | APPLICATION_TITLE ); |
| 150 | 150 | |
| 151 | 151 | //Add an effects icon on the right of the title |
| 152 | - mIconEffectsOff = Image::New( EFFECTS_OFF_ICON ); | |
| 153 | - mIconEffectsOn = Image::New( EFFECTS_ON_ICON ); | |
| 152 | + mIconEffectsOff = ResourceImage::New( EFFECTS_OFF_ICON ); | |
| 153 | + mIconEffectsOn = ResourceImage::New( EFFECTS_ON_ICON ); | |
| 154 | 154 | mActorEffectsButton = Toolkit::PushButton::New(); |
| 155 | 155 | mActorEffectsButton.SetBackgroundImage( mIconEffectsOff ); |
| 156 | 156 | mActorEffectsButton.ClickedSignal().Connect( this, &MotionBlurExampleApp::OnEffectButtonClicked ); |
| ... | ... | @@ -158,7 +158,7 @@ public: |
| 158 | 158 | |
| 159 | 159 | // Creates a mode button. |
| 160 | 160 | // Create a effect toggle button. (right of toolbar) |
| 161 | - Image imageLayout = Image::New( LAYOUT_IMAGE ); | |
| 161 | + Image imageLayout = ResourceImage::New( LAYOUT_IMAGE ); | |
| 162 | 162 | Toolkit::PushButton layoutButton = Toolkit::PushButton::New(); |
| 163 | 163 | layoutButton.SetBackgroundImage(imageLayout); |
| 164 | 164 | layoutButton.ClickedSignal().Connect( this, &MotionBlurExampleApp::OnLayoutButtonClicked); |
| ... | ... | @@ -187,7 +187,7 @@ public: |
| 187 | 187 | // Motion blurred actor |
| 188 | 188 | // |
| 189 | 189 | |
| 190 | - Image image = Image::New( MOTION_BLUR_ACTOR_IMAGE1 ); | |
| 190 | + Image image = ResourceImage::New( MOTION_BLUR_ACTOR_IMAGE1 ); | |
| 191 | 191 | mMotionBlurImageActor = ImageActor::New(image); |
| 192 | 192 | mMotionBlurImageActor.SetParentOrigin( ParentOrigin::CENTER ); |
| 193 | 193 | mMotionBlurImageActor.SetSize(MOTION_BLUR_ACTOR_WIDTH, MOTION_BLUR_ACTOR_HEIGHT); |
| ... | ... | @@ -478,7 +478,7 @@ public: |
| 478 | 478 | mCurrentImage = 0; |
| 479 | 479 | } |
| 480 | 480 | |
| 481 | - Image blurImage = Image::New( MOTION_BLUR_ACTOR_IMAGES[mCurrentImage] ); | |
| 481 | + Image blurImage = ResourceImage::New( MOTION_BLUR_ACTOR_IMAGES[mCurrentImage] ); | |
| 482 | 482 | mMotionBlurImageActor.SetImage(blurImage); |
| 483 | 483 | } |
| 484 | 484 | ... | ... |
examples/motion/motion-stretch-example.cpp
| ... | ... | @@ -136,8 +136,8 @@ public: |
| 136 | 136 | APPLICATION_TITLE ); |
| 137 | 137 | |
| 138 | 138 | //Add an slideshow icon on the right of the title |
| 139 | - mIconEffectsOff = Image::New( EFFECTS_OFF_ICON ); | |
| 140 | - mIconEffectsOn = Image::New( EFFECTS_ON_ICON ); | |
| 139 | + mIconEffectsOff = ResourceImage::New( EFFECTS_OFF_ICON ); | |
| 140 | + mIconEffectsOn = ResourceImage::New( EFFECTS_ON_ICON ); | |
| 141 | 141 | mActorEffectsButton = Toolkit::PushButton::New(); |
| 142 | 142 | mActorEffectsButton.SetBackgroundImage( mIconEffectsOff ); |
| 143 | 143 | mActorEffectsButton.ClickedSignal().Connect( this, &MotionStretchExampleApp::OnEffectButtonClicked ); |
| ... | ... | @@ -145,7 +145,7 @@ public: |
| 145 | 145 | |
| 146 | 146 | // Creates a mode button. |
| 147 | 147 | // Create a effect toggle button. (right of toolbar) |
| 148 | - Image imageLayout = Image::New( LAYOUT_IMAGE ); | |
| 148 | + Image imageLayout = ResourceImage::New( LAYOUT_IMAGE ); | |
| 149 | 149 | Toolkit::PushButton layoutButton = Toolkit::PushButton::New(); |
| 150 | 150 | layoutButton.SetBackgroundImage(imageLayout); |
| 151 | 151 | layoutButton.ClickedSignal().Connect( this, &MotionStretchExampleApp::OnLayoutButtonClicked); |
| ... | ... | @@ -174,7 +174,7 @@ public: |
| 174 | 174 | // Motion stretched actor |
| 175 | 175 | // |
| 176 | 176 | |
| 177 | - Image image = Image::New( MOTION_STRETCH_ACTOR_IMAGE1 ); | |
| 177 | + Image image = ResourceImage::New( MOTION_STRETCH_ACTOR_IMAGE1 ); | |
| 178 | 178 | mMotionStretchImageActor = ImageActor::New(image); |
| 179 | 179 | mMotionStretchImageActor.SetParentOrigin( ParentOrigin::CENTER ); |
| 180 | 180 | mMotionStretchImageActor.SetAnchorPoint( AnchorPoint::CENTER ); |
| ... | ... | @@ -390,7 +390,7 @@ public: |
| 390 | 390 | mCurrentImage = 0; |
| 391 | 391 | } |
| 392 | 392 | |
| 393 | - Image stretchImage = Image::New( MOTION_STRETCH_ACTOR_IMAGES[mCurrentImage] ); | |
| 393 | + Image stretchImage = ResourceImage::New( MOTION_STRETCH_ACTOR_IMAGES[mCurrentImage] ); | |
| 394 | 394 | mMotionStretchImageActor.SetImage(stretchImage); |
| 395 | 395 | } |
| 396 | 396 | ... | ... |
examples/new-window/new-window-example.cpp
| ... | ... | @@ -147,7 +147,7 @@ void NewWindowController::Create( Application& app ) |
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | mLoseContextButton = Toolkit::PushButton::New(); |
| 150 | - mLoseContextButton.SetBackgroundImage( Image::New( LOSE_CONTEXT_IMAGE ) ); | |
| 150 | + mLoseContextButton.SetBackgroundImage( ResourceImage::New( LOSE_CONTEXT_IMAGE ) ); | |
| 151 | 151 | mLoseContextButton.ClickedSignal().Connect( this, &NewWindowController::OnLoseContextButtonClicked ); |
| 152 | 152 | mToolBar.AddControl( mLoseContextButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); |
| 153 | 153 | |
| ... | ... | @@ -158,7 +158,7 @@ void NewWindowController::Create( Application& app ) |
| 158 | 158 | logoLayoutActor.SetScale(0.5f); |
| 159 | 159 | mContentLayer.Add(logoLayoutActor); |
| 160 | 160 | |
| 161 | - Image image = Image::New(DALI_IMAGE_DIR "dali-logo.png"); | |
| 161 | + Image image = ResourceImage::New(DALI_IMAGE_DIR "dali-logo.png"); | |
| 162 | 162 | mImageActor = ImageActor::New(image); |
| 163 | 163 | mImageActor.SetName("dali-logo"); |
| 164 | 164 | mImageActor.SetParentOrigin(ParentOrigin::CENTER); |
| ... | ... | @@ -194,7 +194,7 @@ bool NewWindowController::OnLoseContextButtonClicked( Toolkit::Button button ) |
| 194 | 194 | |
| 195 | 195 | void NewWindowController::CreateMeshActor() |
| 196 | 196 | { |
| 197 | - mEffectImage = Image::New(EFFECT_IMAGE); | |
| 197 | + mEffectImage = ResourceImage::New(EFFECT_IMAGE); | |
| 198 | 198 | |
| 199 | 199 | Material baseMaterial = Material::New( "Material1" ); |
| 200 | 200 | Dali::MeshActor meshActor = MeshActor::New( CreateMesh(true, baseMaterial) ); |
| ... | ... | @@ -220,7 +220,7 @@ void NewWindowController::CreateMeshActor() |
| 220 | 220 | FrameBufferImage NewWindowController::CreateMirrorImage(const char* imageName) |
| 221 | 221 | { |
| 222 | 222 | FrameBufferImage fbo; |
| 223 | - Image image = Image::New(imageName); | |
| 223 | + Image image = ResourceImage::New(imageName); | |
| 224 | 224 | fbo = CreateFrameBufferForImage(imageName, image, ShaderEffect()); |
| 225 | 225 | return fbo; |
| 226 | 226 | } |
| ... | ... | @@ -228,8 +228,8 @@ FrameBufferImage NewWindowController::CreateMirrorImage(const char* imageName) |
| 228 | 228 | ImageActor NewWindowController::CreateBlurredMirrorImage(const char* imageName) |
| 229 | 229 | { |
| 230 | 230 | FrameBufferImage fbo; |
| 231 | - Image image = Image::New( imageName ); | |
| 232 | - Vector2 FBOSize = Image::GetImageSize(imageName); | |
| 231 | + Image image = ResourceImage::New( imageName ); | |
| 232 | + Vector2 FBOSize = ResourceImage::GetImageSize(imageName); | |
| 233 | 233 | fbo = FrameBufferImage::New( FBOSize.width, FBOSize.height, Pixel::RGBA8888); |
| 234 | 234 | GaussianBlurView gbv = GaussianBlurView::New(5, 2.0f, Pixel::RGBA8888, 0.5f, 0.5f, true); |
| 235 | 235 | gbv.SetBackgroundColor(Color::TRANSPARENT); |
| ... | ... | @@ -247,7 +247,7 @@ ImageActor NewWindowController::CreateBlurredMirrorImage(const char* imageName) |
| 247 | 247 | FrameBufferImage NewWindowController::CreateFrameBufferForImage(const char* imageName, Image image, ShaderEffect shaderEffect) |
| 248 | 248 | { |
| 249 | 249 | Stage stage = Stage::GetCurrent(); |
| 250 | - Vector2 FBOSize = Image::GetImageSize(imageName); | |
| 250 | + Vector2 FBOSize = ResourceImage::GetImageSize(imageName); | |
| 251 | 251 | |
| 252 | 252 | FrameBufferImage framebuffer = FrameBufferImage::New(FBOSize.x, FBOSize.y ); |
| 253 | 253 | |
| ... | ... | @@ -288,10 +288,10 @@ FrameBufferImage NewWindowController::CreateFrameBufferForImage(const char* imag |
| 288 | 288 | void NewWindowController::CreateBubbles(Vector2 stageSize) |
| 289 | 289 | { |
| 290 | 290 | mEmitter = Toolkit::BubbleEmitter::New( stageSize, |
| 291 | - Image::New( DALI_IMAGE_DIR "bubble-ball.png" ), | |
| 291 | + ResourceImage::New( DALI_IMAGE_DIR "bubble-ball.png" ), | |
| 292 | 292 | 1000, Vector2( 5.0f, 5.0f ) ); |
| 293 | 293 | |
| 294 | - Image background = Image::New(BACKGROUND_IMAGE); | |
| 294 | + Image background = ResourceImage::New(BACKGROUND_IMAGE); | |
| 295 | 295 | mEmitter.SetBackground( background, mHSVDelta ); |
| 296 | 296 | Actor bubbleRoot = mEmitter.GetRootActor(); |
| 297 | 297 | mContentLayer.Add( bubbleRoot ); |
| ... | ... | @@ -376,7 +376,7 @@ void NewWindowController::CreateBlending() |
| 376 | 376 | blendShader.SetEffectImage( fb2 ); |
| 377 | 377 | blendShader.SetUniform("alpha", 0.5f); |
| 378 | 378 | |
| 379 | - mBaseImage = Image::New(BASE_IMAGE); | |
| 379 | + mBaseImage = ResourceImage::New(BASE_IMAGE); | |
| 380 | 380 | mBlendActor = ImageActor::New( mBaseImage ); |
| 381 | 381 | mBlendActor.SetParentOrigin(ParentOrigin::CENTER); |
| 382 | 382 | mBlendActor.SetPosition(Vector3(150.0f, 200.0f, 0.0f)); | ... | ... |
examples/page-turn-view/page-turn-view-example.cpp
| ... | ... | @@ -79,11 +79,11 @@ class PortraitPageFactory : public PageFactory |
| 79 | 79 | { |
| 80 | 80 | if( pageId == 0 ) |
| 81 | 81 | { |
| 82 | - return ImageActor::New( Image::New( BOOK_COVER_PORTRAIT ) ); | |
| 82 | + return ImageActor::New( ResourceImage::New( BOOK_COVER_PORTRAIT ) ); | |
| 83 | 83 | } |
| 84 | 84 | else |
| 85 | 85 | { |
| 86 | - return ImageActor::New( Image::New( PAGE_IMAGES_PORTRAIT[ (pageId-1) % NUMBER_OF_PORTRAIT_IMAGE ] ) ); | |
| 86 | + return ImageActor::New( ResourceImage::New( PAGE_IMAGES_PORTRAIT[ (pageId-1) % NUMBER_OF_PORTRAIT_IMAGE ] ) ); | |
| 87 | 87 | } |
| 88 | 88 | } |
| 89 | 89 | }; |
| ... | ... | @@ -109,14 +109,14 @@ class LandscapePageFactory : public PageFactory |
| 109 | 109 | ImageActor pageBack; |
| 110 | 110 | if( pageId == 0 ) |
| 111 | 111 | { |
| 112 | - pageFront = ImageActor::New( Image::New( BOOK_COVER_LANDSCAPE ) ); | |
| 113 | - pageBack = ImageActor::New( Image::New( BOOK_COVER_BACK_LANDSCAPE ) ); | |
| 112 | + pageFront = ImageActor::New( ResourceImage::New( BOOK_COVER_LANDSCAPE ) ); | |
| 113 | + pageBack = ImageActor::New( ResourceImage::New( BOOK_COVER_BACK_LANDSCAPE ) ); | |
| 114 | 114 | } |
| 115 | 115 | else |
| 116 | 116 | { |
| 117 | 117 | unsigned int imageId = (pageId-1)*2; |
| 118 | - pageFront = ImageActor::New( Image::New( PAGE_IMAGES_LANDSCAPE[ imageId % NUMBER_OF_LANDSCAPE_IMAGE ] ) ); | |
| 119 | - pageBack = ImageActor::New( Image::New( PAGE_IMAGES_LANDSCAPE[ (imageId+1) % NUMBER_OF_LANDSCAPE_IMAGE ] ) ); | |
| 118 | + pageFront = ImageActor::New( ResourceImage::New( PAGE_IMAGES_LANDSCAPE[ imageId % NUMBER_OF_LANDSCAPE_IMAGE ] ) ); | |
| 119 | + pageBack = ImageActor::New( ResourceImage::New( PAGE_IMAGES_LANDSCAPE[ (imageId+1) % NUMBER_OF_LANDSCAPE_IMAGE ] ) ); | |
| 120 | 120 | } |
| 121 | 121 | pageFront.Add(pageBack); |
| 122 | 122 | return pageFront; | ... | ... |
examples/radial-menu/radial-menu-example.cpp
| ... | ... | @@ -135,8 +135,8 @@ void RadialMenuExample::OnInit(Application& app) |
| 135 | 135 | TOOLBAR_IMAGE, |
| 136 | 136 | APPLICATION_TITLE ); |
| 137 | 137 | |
| 138 | - mIconPlay = Image::New( PLAY_ICON ); | |
| 139 | - mIconStop = Image::New( STOP_ICON ); | |
| 138 | + mIconPlay = ResourceImage::New( PLAY_ICON ); | |
| 139 | + mIconStop = ResourceImage::New( STOP_ICON ); | |
| 140 | 140 | mPlayStopButton = Toolkit::PushButton::New(); |
| 141 | 141 | mPlayStopButton.SetBackgroundImage( mIconStop ); |
| 142 | 142 | |
| ... | ... | @@ -147,7 +147,7 @@ void RadialMenuExample::OnInit(Application& app) |
| 147 | 147 | Toolkit::Alignment::HorizontalRight, |
| 148 | 148 | DemoHelper::DEFAULT_PLAY_PADDING ); |
| 149 | 149 | |
| 150 | - Vector2 imgSize = Image::GetImageSize(TEST_OUTER_RING_FILENAME); | |
| 150 | + Vector2 imgSize = ResourceImage::GetImageSize(TEST_OUTER_RING_FILENAME); | |
| 151 | 151 | Vector2 stageSize = stage.GetSize(); |
| 152 | 152 | float minStageDimension = std::min(stageSize.width, stageSize.height); |
| 153 | 153 | |
| ... | ... | @@ -163,7 +163,7 @@ void RadialMenuExample::OnInit(Application& app) |
| 163 | 163 | mRadialSweepView3.SetInitialActorAngle(Degree(-110)); |
| 164 | 164 | mRadialSweepView3.SetFinalActorAngle(Degree(0)); |
| 165 | 165 | |
| 166 | - Image dial = Image::New( TEST_DIAL_FILENAME ); | |
| 166 | + Image dial = ResourceImage::New( TEST_DIAL_FILENAME ); | |
| 167 | 167 | mDialActor = ImageActor::New( dial ); |
| 168 | 168 | mDialActor.SetPositionInheritanceMode(USE_PARENT_POSITION); |
| 169 | 169 | mDialActor.SetScale(scale); |
| ... | ... | @@ -238,13 +238,13 @@ RadialSweepView RadialMenuExample::CreateSweepView( std::string imageName, |
| 238 | 238 | Degree finalAngle) |
| 239 | 239 | { |
| 240 | 240 | // Create the image |
| 241 | - Image image = Image::New(imageName); | |
| 241 | + Image image = ResourceImage::New(imageName); | |
| 242 | 242 | mImageActor = ImageActor::New(image); |
| 243 | 243 | mImageActor.SetParentOrigin(ParentOrigin::CENTER); |
| 244 | 244 | mImageActor.SetAnchorPoint(AnchorPoint::CENTER); |
| 245 | 245 | |
| 246 | 246 | // Create the stencil |
| 247 | - Vector2 imageSize = Image::GetImageSize(imageName); | |
| 247 | + Vector2 imageSize = ResourceImage::GetImageSize(imageName); | |
| 248 | 248 | float diameter = std::max(imageSize.width, imageSize.height); |
| 249 | 249 | RadialSweepView radialSweepView = RadialSweepView::New(); |
| 250 | 250 | radialSweepView.SetDiameter( diameter ); | ... | ... |
examples/scroll-view/scroll-view-example.cpp
| ... | ... | @@ -194,11 +194,11 @@ public: |
| 194 | 194 | TOOLBAR_IMAGE, |
| 195 | 195 | "" ); |
| 196 | 196 | |
| 197 | - mEffectIcon[ DepthEffect ] = Image::New( EFFECT_DEPTH_IMAGE ); | |
| 198 | - mEffectIcon[ CubeEffect ] = Image::New( EFFECT_INNER_CUBE_IMAGE ); | |
| 199 | - mEffectIcon[ PageCarouselEffect ] = Image::New( EFFECT_CAROUSEL_IMAGE ); | |
| 200 | - mEffectIcon[ PageCubeEffect ] = Image::New( EFFECT_CAROUSEL_IMAGE ); | |
| 201 | - mEffectIcon[ PageSpiralEffect ] = Image::New( EFFECT_CAROUSEL_IMAGE ); | |
| 197 | + mEffectIcon[ DepthEffect ] = ResourceImage::New( EFFECT_DEPTH_IMAGE ); | |
| 198 | + mEffectIcon[ CubeEffect ] = ResourceImage::New( EFFECT_INNER_CUBE_IMAGE ); | |
| 199 | + mEffectIcon[ PageCarouselEffect ] = ResourceImage::New( EFFECT_CAROUSEL_IMAGE ); | |
| 200 | + mEffectIcon[ PageCubeEffect ] = ResourceImage::New( EFFECT_CAROUSEL_IMAGE ); | |
| 201 | + mEffectIcon[ PageSpiralEffect ] = ResourceImage::New( EFFECT_CAROUSEL_IMAGE ); | |
| 202 | 202 | |
| 203 | 203 | // Create a effect change button. (right of toolbar) |
| 204 | 204 | mEffectChangeButton = Toolkit::PushButton::New(); |
| ... | ... | @@ -563,7 +563,7 @@ private: |
| 563 | 563 | |
| 564 | 564 | attributes.SetSize(width, height); |
| 565 | 565 | attributes.SetScalingMode(ImageAttributes::ShrinkToFit); |
| 566 | - Image img = Image::New(filename, attributes); | |
| 566 | + Image img = ResourceImage::New(filename, attributes); | |
| 567 | 567 | ImageActor actor = ImageActor::New(img); |
| 568 | 568 | actor.SetName( filename ); |
| 569 | 569 | actor.SetParentOrigin(ParentOrigin::CENTER); | ... | ... |
examples/shader-effect/bubble-effect-example.cpp
| ... | ... | @@ -94,7 +94,7 @@ private: |
| 94 | 94 | |
| 95 | 95 | // Add a button to change background. (right of toolbar) |
| 96 | 96 | mChangeBackgroundButton = Toolkit::PushButton::New(); |
| 97 | - mChangeBackgroundButton.SetBackgroundImage( Image::New( CHANGE_BACKGROUND_ICON ) ); | |
| 97 | + mChangeBackgroundButton.SetBackgroundImage( ResourceImage::New( CHANGE_BACKGROUND_ICON ) ); | |
| 98 | 98 | mChangeBackgroundButton.ClickedSignal().Connect( this, &BubbleEffectExample::OnChangeIconClicked ); |
| 99 | 99 | toolBar.AddControl( mChangeBackgroundButton, |
| 100 | 100 | DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, |
| ... | ... | @@ -102,7 +102,7 @@ private: |
| 102 | 102 | DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); |
| 103 | 103 | // Add a button to change bubble shape. ( left of bar ) |
| 104 | 104 | mChangeBubbleShapeButton = Toolkit::PushButton::New(); |
| 105 | - mChangeBubbleShapeButton.SetBackgroundImage( Image::New( CHANGE_BUBBLE_SHAPE_ICON ) ); | |
| 105 | + mChangeBubbleShapeButton.SetBackgroundImage( ResourceImage::New( CHANGE_BUBBLE_SHAPE_ICON ) ); | |
| 106 | 106 | mChangeBubbleShapeButton.ClickedSignal().Connect( this, &BubbleEffectExample::OnChangeIconClicked ); |
| 107 | 107 | toolBar.AddControl( mChangeBubbleShapeButton, |
| 108 | 108 | DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, |
| ... | ... | @@ -111,10 +111,10 @@ private: |
| 111 | 111 | |
| 112 | 112 | // Create and initialize the BubbleEmitter object |
| 113 | 113 | mBubbleEmitter = Toolkit::BubbleEmitter::New( stageSize, |
| 114 | - Image::New( BUBBLE_SHAPE_IMAGES[mCurrentBubbleShapeImageId] ), | |
| 114 | + ResourceImage::New( BUBBLE_SHAPE_IMAGES[mCurrentBubbleShapeImageId] ), | |
| 115 | 115 | DEFAULT_NUMBER_OF_BUBBLES, |
| 116 | 116 | DEFAULT_BUBBLE_SIZE); |
| 117 | - mBackgroundImage = Image::New( BACKGROUND_IMAGES[mCurrentBackgroundImageId] ); | |
| 117 | + mBackgroundImage = ResourceImage::New( BACKGROUND_IMAGES[mCurrentBackgroundImageId] ); | |
| 118 | 118 | mBubbleEmitter.SetBackground( mBackgroundImage, mHSVDelta ); |
| 119 | 119 | |
| 120 | 120 | // Get the root actor of all bubbles, and add it to stage. |
| ... | ... | @@ -235,7 +235,7 @@ private: |
| 235 | 235 | { |
| 236 | 236 | if(button == mChangeBackgroundButton) |
| 237 | 237 | { |
| 238 | - mBackgroundImage = Image::New( BACKGROUND_IMAGES[ ++mCurrentBackgroundImageId % NUM_BACKGROUND_IMAGES ] ); | |
| 238 | + mBackgroundImage = ResourceImage::New( BACKGROUND_IMAGES[ ++mCurrentBackgroundImageId % NUM_BACKGROUND_IMAGES ] ); | |
| 239 | 239 | |
| 240 | 240 | mBubbleEmitter.SetBackground( mBackgroundImage, mHSVDelta ); |
| 241 | 241 | |
| ... | ... | @@ -243,7 +243,7 @@ private: |
| 243 | 243 | } |
| 244 | 244 | else if( button == mChangeBubbleShapeButton ) |
| 245 | 245 | { |
| 246 | - mBubbleEmitter.SetShapeImage( Image::New( BUBBLE_SHAPE_IMAGES[ ++mCurrentBubbleShapeImageId % NUM_BUBBLE_SHAPE_IMAGES ] ) ); | |
| 246 | + mBubbleEmitter.SetShapeImage( ResourceImage::New( BUBBLE_SHAPE_IMAGES[ ++mCurrentBubbleShapeImageId % NUM_BUBBLE_SHAPE_IMAGES ] ) ); | |
| 247 | 247 | } |
| 248 | 248 | return true; |
| 249 | 249 | } | ... | ... |
examples/shader-effect/dissolve-effect-example.cpp
| ... | ... | @@ -192,8 +192,8 @@ void DissolveEffectApp::OnInit( Application& application ) |
| 192 | 192 | mContent = DemoHelper::CreateView( application, mView,mToolBar, "", TOOLBAR_IMAGE, "" ); |
| 193 | 193 | |
| 194 | 194 | // Add an effect-changing button on the right of the tool bar. |
| 195 | - mIconHighP = Image::New( EFFECT_HIGHP_IMAGE ); | |
| 196 | - mIconMediumP = Image::New( EFFECT_MEDIUMP_IMAGE ); | |
| 195 | + mIconHighP = ResourceImage::New( EFFECT_HIGHP_IMAGE ); | |
| 196 | + mIconMediumP = ResourceImage::New( EFFECT_MEDIUMP_IMAGE ); | |
| 197 | 197 | mEffectChangeButton = Toolkit::PushButton::New(); |
| 198 | 198 | mEffectChangeButton.SetBackgroundImage(mIconHighP); |
| 199 | 199 | mEffectChangeButton.ClickedSignal().Connect( this, &DissolveEffectApp::OnEffectButtonClicked ); |
| ... | ... | @@ -206,8 +206,8 @@ void DissolveEffectApp::OnInit( Application& application ) |
| 206 | 206 | mToolBar.AddControl( mTitleActor, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarTitlePercentage, Toolkit::Alignment::HorizontalCenter ); |
| 207 | 207 | |
| 208 | 208 | // Add an slide-show button on the right of the title |
| 209 | - mIconPlay = Image::New( PLAY_ICON ); | |
| 210 | - mIconStop = Image::New( STOP_ICON ); | |
| 209 | + mIconPlay = ResourceImage::New( PLAY_ICON ); | |
| 210 | + mIconStop = ResourceImage::New( STOP_ICON ); | |
| 211 | 211 | mPlayStopButton = Toolkit::PushButton::New(); |
| 212 | 212 | mPlayStopButton.SetBackgroundImage( mIconPlay ); |
| 213 | 213 | mPlayStopButton.ClickedSignal().Connect( this, &DissolveEffectApp::OnSildeshowButtonClicked ); |
| ... | ... | @@ -229,7 +229,7 @@ void DissolveEffectApp::OnInit( Application& application ) |
| 229 | 229 | mSizeConstraint= Constraint::New<Vector3>( Actor::SCALE, LocalSource( Actor::SIZE ), ParentSource( Actor::SIZE ), ScaleToFitKeepAspectRatioConstraint() ); |
| 230 | 230 | |
| 231 | 231 | // show the first image |
| 232 | - mCurrentImage = ImageActor::New( Image::New( IMAGES[mIndex] ) ); | |
| 232 | + mCurrentImage = ImageActor::New( ResourceImage::New( IMAGES[mIndex] ) ); | |
| 233 | 233 | mCurrentImage.SetPositionInheritanceMode(USE_PARENT_POSITION_PLUS_LOCAL_POSITION); |
| 234 | 234 | mCurrentImage.ApplyConstraint( mSizeConstraint ); |
| 235 | 235 | mContent.Add(mCurrentImage); |
| ... | ... | @@ -256,7 +256,7 @@ void DissolveEffectApp::OnPanGesture( Actor actor, const PanGesture& gesture ) |
| 256 | 256 | mIndex = (mIndex + NUM_IMAGES -1)%NUM_IMAGES; |
| 257 | 257 | } |
| 258 | 258 | |
| 259 | - Image image = Image::New( IMAGES[ mIndex ] ); | |
| 259 | + Image image = ResourceImage::New( IMAGES[ mIndex ] ); | |
| 260 | 260 | mNextImage = ImageActor::New( image ); |
| 261 | 261 | mNextImage.SetPositionInheritanceMode(USE_PARENT_POSITION_PLUS_LOCAL_POSITION); |
| 262 | 262 | mNextImage.ApplyConstraint( mSizeConstraint ); |
| ... | ... | @@ -368,7 +368,7 @@ bool DissolveEffectApp::OnTimerTick() |
| 368 | 368 | if(mSlideshow) |
| 369 | 369 | { |
| 370 | 370 | mIndex = (mIndex + 1)%NUM_IMAGES; |
| 371 | - Image image = Image::New( IMAGES[ mIndex ] ); | |
| 371 | + Image image = ResourceImage::New( IMAGES[ mIndex ] ); | |
| 372 | 372 | mNextImage = ImageActor::New( image ); |
| 373 | 373 | mNextImage.SetPositionInheritanceMode(USE_PARENT_POSITION_PLUS_LOCAL_POSITION); |
| 374 | 374 | mNextImage.ApplyConstraint( mSizeConstraint ); | ... | ... |
examples/shader-effect/refraction-effect-example.cpp
| ... | ... | @@ -318,7 +318,7 @@ private: |
| 318 | 318 | |
| 319 | 319 | // Add a button to change background. (right of toolbar) |
| 320 | 320 | mChangeTextureButton = Toolkit::PushButton::New(); |
| 321 | - mChangeTextureButton.SetBackgroundImage( Image::New( CHANGE_TEXTURE_ICON ) ); | |
| 321 | + mChangeTextureButton.SetBackgroundImage( ResourceImage::New( CHANGE_TEXTURE_ICON ) ); | |
| 322 | 322 | mChangeTextureButton.ClickedSignal().Connect( this, &RefractionEffectExample::OnChangeTexture ); |
| 323 | 323 | toolBar.AddControl( mChangeTextureButton, |
| 324 | 324 | DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, |
| ... | ... | @@ -326,7 +326,7 @@ private: |
| 326 | 326 | DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); |
| 327 | 327 | // Add a button to change mesh pattern. ( left of bar ) |
| 328 | 328 | mChangeMeshButton = Toolkit::PushButton::New(); |
| 329 | - mChangeMeshButton.SetBackgroundImage( Image::New( CHANGE_MESH_ICON ) ); | |
| 329 | + mChangeMeshButton.SetBackgroundImage( ResourceImage::New( CHANGE_MESH_ICON ) ); | |
| 330 | 330 | mChangeMeshButton.ClickedSignal().Connect( this, &RefractionEffectExample::OnChangeMesh ); |
| 331 | 331 | toolBar.AddControl( mChangeMeshButton, |
| 332 | 332 | DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, |
| ... | ... | @@ -338,7 +338,7 @@ private: |
| 338 | 338 | mNoEffect = NoEffect::New(); // used in the other situations, basic render shader |
| 339 | 339 | // Create the mesh from the obj file and add to stage |
| 340 | 340 | mMaterial = Material::New( "Material" ) ; |
| 341 | - mMaterial.SetDiffuseTexture(Image::New(TEXTURE_IMAGES[mCurrentTextureId])); | |
| 341 | + mMaterial.SetDiffuseTexture(ResourceImage::New(TEXTURE_IMAGES[mCurrentTextureId])); | |
| 342 | 342 | CreateSurface( MESH_FILES[mCurrentMeshId] ); |
| 343 | 343 | |
| 344 | 344 | // Connect the callback to the touch signal on the mesh actor |
| ... | ... | @@ -371,7 +371,7 @@ private: |
| 371 | 371 | bool OnChangeTexture( Toolkit::Button button ) |
| 372 | 372 | { |
| 373 | 373 | mCurrentTextureId = ( mCurrentTextureId + 1 ) % NUM_TEXTURE_IMAGES; |
| 374 | - mMaterial.SetDiffuseTexture(Image::New(TEXTURE_IMAGES[mCurrentTextureId])); | |
| 374 | + mMaterial.SetDiffuseTexture(ResourceImage::New(TEXTURE_IMAGES[mCurrentTextureId])); | |
| 375 | 375 | |
| 376 | 376 | return true; |
| 377 | 377 | } | ... | ... |
examples/shadows/shadow-bone-lighting-example.cpp
| ... | ... | @@ -148,7 +148,7 @@ public: |
| 148 | 148 | "" ); |
| 149 | 149 | |
| 150 | 150 | // Add an effect-changing button on the right of the tool bar. |
| 151 | - Image imageChangeEffect = Image::New( CHANGE_EFFECT_IMAGE ); | |
| 151 | + Image imageChangeEffect = ResourceImage::New( CHANGE_EFFECT_IMAGE ); | |
| 152 | 152 | Toolkit::PushButton effectChangeButton = Toolkit::PushButton::New(); |
| 153 | 153 | effectChangeButton.SetBackgroundImage(imageChangeEffect); |
| 154 | 154 | effectChangeButton.ClickedSignal().Connect( this, &TestApp::OnEffectButtonClicked ); |
| ... | ... | @@ -164,7 +164,7 @@ public: |
| 164 | 164 | mTitleActor.SetStyleToCurrentText( DemoHelper::GetDefaultTextStyle() ); |
| 165 | 165 | |
| 166 | 166 | //Add a reset button |
| 167 | - Image resetImage = Image::New( RESET_ICON ); | |
| 167 | + Image resetImage = ResourceImage::New( RESET_ICON ); | |
| 168 | 168 | Toolkit::PushButton resetButton = Toolkit::PushButton::New(); |
| 169 | 169 | resetButton.SetBackgroundImage( resetImage ); |
| 170 | 170 | resetButton.ClickedSignal().Connect( this, &TestApp::OnResetPressed ); |
| ... | ... | @@ -237,7 +237,7 @@ public: |
| 237 | 237 | mShadowView.SetPointLightFieldOfView( Math::PI / 2.0f); |
| 238 | 238 | mContents.Add(mShadowView); |
| 239 | 239 | |
| 240 | - Image brickWall = Image::New(DALI_IMAGE_DIR "brick-wall.jpg"); | |
| 240 | + Image brickWall = ResourceImage::New(DALI_IMAGE_DIR "brick-wall.jpg"); | |
| 241 | 241 | mShadowPlaneBg = ImageActor::New(brickWall); |
| 242 | 242 | mShadowPlaneBg.SetParentOrigin(ParentOrigin::CENTER); |
| 243 | 243 | mShadowPlaneBg.SetAnchorPoint(AnchorPoint::CENTER); | ... | ... |
examples/shared/view.h
| ... | ... | @@ -93,7 +93,7 @@ Dali::Layer CreateToolbar( Dali::Toolkit::ToolBar& toolBar, |
| 93 | 93 | toolBarLayer.RaiseToTop(); |
| 94 | 94 | |
| 95 | 95 | // Tool bar |
| 96 | - Dali::Image image = Dali::Image::New( toolbarImagePath ); | |
| 96 | + Dali::Image image = Dali::ResourceImage::New( toolbarImagePath ); | |
| 97 | 97 | Dali::ImageActor toolBarBackground = Dali::ImageActor::New( image ); |
| 98 | 98 | toolBar = Dali::Toolkit::ToolBar::New(); |
| 99 | 99 | toolBar.SetBackground( toolBarBackground ); |
| ... | ... | @@ -145,7 +145,7 @@ Dali::Layer CreateView( Dali::Application& application, |
| 145 | 145 | // Set background image. |
| 146 | 146 | if ( ! backgroundImagePath.empty() ) |
| 147 | 147 | { |
| 148 | - Dali::Image backgroundImage = Dali::Image::New( backgroundImagePath ); | |
| 148 | + Dali::Image backgroundImage = Dali::ResourceImage::New( backgroundImagePath ); | |
| 149 | 149 | Dali::ImageActor backgroundImageActor = Dali::ImageActor::New( backgroundImage ); |
| 150 | 150 | view.SetBackground( backgroundImageActor ); |
| 151 | 151 | } | ... | ... |
examples/transition/cube-transition-effect-example.cpp
| ... | ... | @@ -120,7 +120,7 @@ private: |
| 120 | 120 | * Start the transition |
| 121 | 121 | * @param[in] image The image content of the imageActor for transition |
| 122 | 122 | */ |
| 123 | - void OnImageLoaded(Image image); | |
| 123 | + void OnImageLoaded(ResourceImage image); | |
| 124 | 124 | /** |
| 125 | 125 | * Main key event handler |
| 126 | 126 | */ |
| ... | ... | @@ -209,9 +209,9 @@ void CubeTransitionApp::OnInit( Application& application ) |
| 209 | 209 | mContent = DemoHelper::CreateView( application, mView, mToolBar, "", TOOLBAR_IMAGE, "" ); |
| 210 | 210 | |
| 211 | 211 | // Add an effect-changing button on the right of the tool bar. |
| 212 | - mImageWave = Image::New( EFFECT_WAVE_IMAGE ); | |
| 213 | - mImageCross = Image::New( EFFECT_CROSS_IMAGE ); | |
| 214 | - mImageFold = Image::New( EFFECT_FOLD_IMAGE ); | |
| 212 | + mImageWave = ResourceImage::New( EFFECT_WAVE_IMAGE ); | |
| 213 | + mImageCross = ResourceImage::New( EFFECT_CROSS_IMAGE ); | |
| 214 | + mImageFold = ResourceImage::New( EFFECT_FOLD_IMAGE ); | |
| 215 | 215 | mEffectChangeButton = Toolkit::PushButton::New(); |
| 216 | 216 | mEffectChangeButton.SetBackgroundImage(mImageWave); |
| 217 | 217 | mEffectChangeButton.ClickedSignal().Connect( this, &CubeTransitionApp::OnEffectButtonClicked ); |
| ... | ... | @@ -222,8 +222,8 @@ void CubeTransitionApp::OnInit( Application& application ) |
| 222 | 222 | mToolBar.AddControl( mTitleActor, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarTitlePercentage, Toolkit::Alignment::HorizontalCenter ); |
| 223 | 223 | |
| 224 | 224 | //Add an slideshow icon on the right of the title |
| 225 | - mIconSlideshowStart = Image::New( SLIDE_SHOW_START_ICON ); | |
| 226 | - mIconSlideshowStop = Image::New( SLIDE_SHOW_STOP_ICON ); | |
| 225 | + mIconSlideshowStart = ResourceImage::New( SLIDE_SHOW_START_ICON ); | |
| 226 | + mIconSlideshowStop = ResourceImage::New( SLIDE_SHOW_STOP_ICON ); | |
| 227 | 227 | mSlideshowButton = Toolkit::PushButton::New(); |
| 228 | 228 | mSlideshowButton.SetBackgroundImage( mIconSlideshowStart ); |
| 229 | 229 | mSlideshowButton.ClickedSignal().Connect( this, &CubeTransitionApp::OnSildeshowButtonClicked ); |
| ... | ... | @@ -266,7 +266,7 @@ void CubeTransitionApp::OnInit( Application& application ) |
| 266 | 266 | // show the first image |
| 267 | 267 | mImageConstraint = Constraint::New<Vector3>( Actor::SCALE, LocalSource( Actor::SIZE ), ParentSource( Actor::SIZE ), ScaleToFitKeepAspectRatioConstraint() ); |
| 268 | 268 | |
| 269 | - mCurrentImage = ImageActor::New( Image::New( IMAGES[mIndex] ) ); | |
| 269 | + mCurrentImage = ImageActor::New( ResourceImage::New( IMAGES[mIndex] ) ); | |
| 270 | 270 | mCurrentImage.SetPositionInheritanceMode( USE_PARENT_POSITION ); |
| 271 | 271 | mCurrentImage.ApplyConstraint( mImageConstraint ); |
| 272 | 272 | mParent.Add( mCurrentImage ); |
| ... | ... | @@ -308,23 +308,24 @@ void CubeTransitionApp::OnPanGesture( Actor actor, const PanGesture& gesture ) |
| 308 | 308 | |
| 309 | 309 | void CubeTransitionApp::GoToNextImage() |
| 310 | 310 | { |
| 311 | - Image image = Image::New( IMAGES[ mIndex ] ); | |
| 311 | + ResourceImage image = ResourceImage::New( IMAGES[ mIndex ] ); | |
| 312 | 312 | mNextImage = ImageActor::New( image ); |
| 313 | 313 | mNextImage.SetPositionInheritanceMode(USE_PARENT_POSITION); |
| 314 | 314 | mNextImage.ApplyConstraint( mImageConstraint ); |
| 315 | 315 | mCurrentEffect.SetTargetImage(mNextImage); |
| 316 | - mIsImageLoading = true; | |
| 317 | 316 | if( image.GetLoadingState() == ResourceLoadingSucceeded ) |
| 318 | 317 | { |
| 319 | - OnImageLoaded( image ); | |
| 318 | + mIsImageLoading = false; | |
| 319 | + OnImageLoaded( image ); | |
| 320 | 320 | } |
| 321 | 321 | else |
| 322 | 322 | { |
| 323 | + mIsImageLoading = true; | |
| 323 | 324 | image.LoadingFinishedSignal().Connect( this, &CubeTransitionApp::OnImageLoaded ); |
| 324 | 325 | } |
| 325 | 326 | } |
| 326 | 327 | |
| 327 | -void CubeTransitionApp::OnImageLoaded(Image image) | |
| 328 | +void CubeTransitionApp::OnImageLoaded(ResourceImage image) | |
| 328 | 329 | { |
| 329 | 330 | mIsImageLoading = false; |
| 330 | 331 | mCurrentEffect.StartTransition( mPanPosition, mPanDisplacement ); | ... | ... |