X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=examples%2Fcube-transition-effect%2Fcube-transition-effect-example.cpp;h=0090720b8c10f19c9b36283ee31a4586c0ea1160;hb=1801f93b55796a13f1e1f007b38005628a7f7fbc;hp=cd0e38978561c257276a117e7d969ac4e09759a6;hpb=8054811cf315080dc444dffe373d47c634cd3163;p=platform%2Fcore%2Fuifw%2Fdali-demo.git diff --git a/examples/cube-transition-effect/cube-transition-effect-example.cpp b/examples/cube-transition-effect/cube-transition-effect-example.cpp index cd0e389..0090720 100644 --- a/examples/cube-transition-effect/cube-transition-effect-example.cpp +++ b/examples/cube-transition-effect/cube-transition-effect-example.cpp @@ -91,19 +91,15 @@ const int VIEWINGTIME = 2000; // 2 seconds /** * @brief Load an image, scaled-down to no more than the stage dimensions. * - * Uses image scaling mode ImageAttributes::ScaleToFill to resize the image at + * Uses image scaling mode SCALE_TO_FILL to resize the image at * load time to cover the entire stage with pixels with no borders, - * and filter mode ImageAttributes::BoxThenLinear to sample the image with + * and filter mode BOX_THEN_LINEAR to sample the image with * maximum quality. */ ResourceImage LoadStageFillingImage( const char * const imagePath ) { Size stageSize = Stage::GetCurrent().GetSize(); - ImageAttributes attributes; - attributes.SetSize( stageSize.x, stageSize.y ); - attributes.SetFilterMode( ImageAttributes::BoxThenLinear ); - attributes.SetScalingMode( ImageAttributes::ScaleToFill ); - return ResourceImage::New( imagePath, attributes ); + return ResourceImage::New( imagePath, ImageDimensions( stageSize.x, stageSize.y ), Dali::FittingMode::SCALE_TO_FILL, Dali::SamplingMode::BOX_THEN_LINEAR ); } } // namespace @@ -288,8 +284,8 @@ void CubeTransitionApp::OnInit( Application& application ) // show the first image mCurrentImage = ImageActor::New( LoadStageFillingImage( IMAGES[mIndex] ) ); mCurrentImage.SetPositionInheritanceMode( USE_PARENT_POSITION ); - mCurrentImage.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); - mCurrentImage.SetSizeScalePolicy( FIT_WITH_ASPECT_RATIO ); + mCurrentImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); + mCurrentImage.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); mParent.Add( mCurrentImage ); mCurrentEffect = mCubeWaveEffect; @@ -328,8 +324,8 @@ void CubeTransitionApp::GoToNextImage() mNextImage = ImageActor::New( image ); mNextImage.SetPositionInheritanceMode(USE_PARENT_POSITION); - mNextImage.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS ); - mNextImage.SetSizeScalePolicy( FIT_WITH_ASPECT_RATIO ); + mNextImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); + mNextImage.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); mNextImage.SetRelayoutEnabled( false ); mCurrentEffect.SetTargetImage(mNextImage); if( image.GetLoadingState() == ResourceLoadingSucceeded )