*/
ImageActor CreateBackground( std::string imagePath )
{
- Image image = Image::New( imagePath );
+ Image image = ResourceImage::New( imagePath );
ImageActor background = ImageActor::New( image );
background.SetAnchorPoint( AnchorPoint::CENTER );
// 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 );
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 );
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 );
"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 },
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);
*/
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);
// 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 );
// 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 );
{
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 );
{
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 );
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 );
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) );
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;
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 );
"" );
// 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 );
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) );
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);
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
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 );
attributes.SetSize( width, height );
attributes.SetScalingMode( scalingMode );
- Image image = Image::New( filename, attributes );
+ Image image = ResourceImage::New( filename, attributes );
return image;
}
"" );
// 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 );
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;
}
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;
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.
// 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 );
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 );
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 );
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 );
{
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;
}
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 );
}
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 );
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 );
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 );
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 );
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 );
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 );
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 );
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 );
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 );
// 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);
// 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);
mCurrentImage = 0;
}
- Image blurImage = Image::New( MOTION_BLUR_ACTOR_IMAGES[mCurrentImage] );
+ Image blurImage = ResourceImage::New( MOTION_BLUR_ACTOR_IMAGES[mCurrentImage] );
mMotionBlurImageActor.SetImage(blurImage);
}
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 );
// 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);
// 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 );
mCurrentImage = 0;
}
- Image stretchImage = Image::New( MOTION_STRETCH_ACTOR_IMAGES[mCurrentImage] );
+ Image stretchImage = ResourceImage::New( MOTION_STRETCH_ACTOR_IMAGES[mCurrentImage] );
mMotionStretchImageActor.SetImage(stretchImage);
}
}
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 );
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);
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) );
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;
}
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);
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 );
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 );
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));
{
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 ] ) );
}
}
};
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;
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 );
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);
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);
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 );
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();
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);
// 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,
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,
// 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.
{
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 );
}
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;
}
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 );
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 );
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);
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 );
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 );
// 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,
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,
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
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;
}
"" );
// 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 );
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 );
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);
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 );
// 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 );
}
* 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
*/
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 );
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 );
// 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 );
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 );