2 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 * @file image-scaling-irregular-grid-example.cpp
20 * @brief Demonstrates how to use image scaling modes when loading images.
22 * If an image is going to be drawn on-screen at a lower resolution than it is
23 * stored at on-disk, the scaling feature of the image loader can be used to
24 * reduce the image to save memory, improve performance, and potentially display
25 * a better small version of the image than if the default size were loaded.
27 * The functions CreateImage and CreateImageActor below show how to build an
28 * image using a scaling mode to have %Dali resize it during loading.
30 * This demo defaults to the SCALE_TO_FILL mode of ImageAttributes which makes
31 * sure that every pixel in the loaded image is filled with a source colour
32 * from the image's central region while losing the minimum number of pixels
34 * It is the best option for producing thumbnails of input images that have
35 * diverse aspect ratios.
37 * The other four scaling modes of dali can be cycled-through for the whole
38 * grid using the button in the top-right of the toolbar.
39 * A single image can be cycled by clicking the image directly.
41 * @see CreateImage CreateImageActor
47 #include <dali-toolkit/dali-toolkit.h>
51 #include "grid-flags.h"
52 #include "shared/view.h"
55 using namespace Dali::Toolkit;
56 using namespace Dali::Demo;
61 /** Controls the output of application logging. */
62 //#define DEBUG_PRINT_DIAGNOSTICS;
64 const char* BACKGROUND_IMAGE( DALI_IMAGE_DIR "background-gradient.jpg" );
65 const char* TOOLBAR_IMAGE( DALI_IMAGE_DIR "top-bar.png" );
66 const char* APPLICATION_TITLE( "Image Scaling Modes" );
67 const char* TOGGLE_SCALING_IMAGE( DALI_IMAGE_DIR "icon-change.png" );
69 /** The width of the grid in whole grid cells. */
70 const unsigned GRID_WIDTH = 9;
71 /** Limit the grid to be no higher than this in units of a cell. */
72 const unsigned GRID_MAX_HEIGHT = 600;
74 /** The space between the edge of a grid cell and the image embedded within it. */
75 const unsigned GRID_CELL_PADDING = 4;
77 /** The aspect ratio of cells in the image grid. */
78 const float CELL_ASPECT_RATIO = 1.33333333333333333333f;
80 const Dali::FittingMode::Type DEFAULT_SCALING_MODE = Dali::FittingMode::SCALE_TO_FILL;
82 /** The number of times to spin an image on touching, each spin taking a second.*/
83 const float SPIN_DURATION = 1.0f;
85 /** The target image sizes in grid cells. */
86 const Vector2 IMAGE_SIZES[] = {
94 // Large, tall configuration:
95 Vector2( GRID_WIDTH / 2, GRID_WIDTH + GRID_WIDTH / 2 ),
96 // Large, square-ish images to show shrink-to-fit well with wide and tall images:
97 Vector2( GRID_WIDTH / 2, GRID_WIDTH / 2.0f * CELL_ASPECT_RATIO + 0.5f ),
98 Vector2( GRID_WIDTH - 2, (GRID_WIDTH - 2) * CELL_ASPECT_RATIO + 0.5f ),
100 const unsigned NUM_IMAGE_SIZES = sizeof(IMAGE_SIZES) / sizeof(IMAGE_SIZES[0]);
102 /** Images to load into the grid. These are mostly large and non-square to
103 * show the scaling. */
104 const char* IMAGE_PATHS[] = {
106 DALI_IMAGE_DIR "dali-logo.png",
107 DALI_IMAGE_DIR "com.samsung.dali-demo.ico",
108 DALI_IMAGE_DIR "square_primitive_shapes.bmp",
109 DALI_IMAGE_DIR "gallery-large-14.wbmp",
111 // Images that show aspect ratio changes clearly in primitive shapes:
113 DALI_IMAGE_DIR "portrait_screen_primitive_shapes.gif",
114 DALI_IMAGE_DIR "landscape_screen_primitive_shapes.gif",
116 // Images from other demos that are tall, wide or just large:
118 DALI_IMAGE_DIR "gallery-large-1.jpg",
119 DALI_IMAGE_DIR "gallery-large-2.jpg",
120 DALI_IMAGE_DIR "gallery-large-3.jpg",
121 DALI_IMAGE_DIR "gallery-large-4.jpg",
122 DALI_IMAGE_DIR "gallery-large-5.jpg",
123 DALI_IMAGE_DIR "gallery-large-6.jpg",
124 DALI_IMAGE_DIR "gallery-large-7.jpg",
125 DALI_IMAGE_DIR "gallery-large-8.jpg",
126 DALI_IMAGE_DIR "gallery-large-9.jpg",
127 DALI_IMAGE_DIR "gallery-large-10.jpg",
128 DALI_IMAGE_DIR "gallery-large-11.jpg",
129 DALI_IMAGE_DIR "gallery-large-12.jpg",
130 DALI_IMAGE_DIR "gallery-large-13.jpg",
131 DALI_IMAGE_DIR "gallery-large-14.jpg",
132 DALI_IMAGE_DIR "gallery-large-15.jpg",
133 DALI_IMAGE_DIR "gallery-large-16.jpg",
134 DALI_IMAGE_DIR "gallery-large-17.jpg",
135 DALI_IMAGE_DIR "gallery-large-18.jpg",
136 DALI_IMAGE_DIR "gallery-large-19.jpg",
137 DALI_IMAGE_DIR "gallery-large-20.jpg",
138 DALI_IMAGE_DIR "gallery-large-21.jpg",
140 DALI_IMAGE_DIR "background-1.jpg",
141 DALI_IMAGE_DIR "background-2.jpg",
142 DALI_IMAGE_DIR "background-3.jpg",
143 DALI_IMAGE_DIR "background-4.jpg",
144 DALI_IMAGE_DIR "background-5.jpg",
145 DALI_IMAGE_DIR "background-blocks.jpg",
146 DALI_IMAGE_DIR "background-magnifier.jpg",
148 DALI_IMAGE_DIR "background-1.jpg",
149 DALI_IMAGE_DIR "background-2.jpg",
150 DALI_IMAGE_DIR "background-3.jpg",
151 DALI_IMAGE_DIR "background-4.jpg",
152 DALI_IMAGE_DIR "background-5.jpg",
153 DALI_IMAGE_DIR "background-blocks.jpg",
154 DALI_IMAGE_DIR "background-magnifier.jpg",
156 DALI_IMAGE_DIR "book-landscape-cover-back.jpg",
157 DALI_IMAGE_DIR "book-landscape-cover.jpg",
158 DALI_IMAGE_DIR "book-landscape-p1.jpg",
159 DALI_IMAGE_DIR "book-landscape-p2.jpg",
161 DALI_IMAGE_DIR "book-portrait-cover.jpg",
162 DALI_IMAGE_DIR "book-portrait-p1.jpg",
163 DALI_IMAGE_DIR "book-portrait-p2.jpg",
166 const unsigned NUM_IMAGE_PATHS = sizeof(IMAGE_PATHS) / sizeof(IMAGE_PATHS[0]) - 1u;
172 * @param[in] filename The path of the image.
173 * @param[in] width The width of the image in pixels.
174 * @param[in] height The height of the image in pixels.
175 * @param[in] fittingMode The mode to use when scaling the image to fit the desired dimensions.
177 Image CreateImage(const std::string& filename, unsigned int width, unsigned int height, Dali::FittingMode::Type fittingMode )
179 #ifdef DEBUG_PRINT_DIAGNOSTICS
180 fprintf( stderr, "CreateImage(%s, %u, %u, fittingMode=%u)\n", filename.c_str(), width, height, unsigned( fittingMode ) );
182 Image image = ResourceImage::New( filename, ImageDimensions( width, height ), fittingMode, Dali::SamplingMode::BOX_THEN_LINEAR );
188 * Creates an ImageActor
190 * @param[in] filename The path of the image.
191 * @param[in] width The width of the image in pixels.
192 * @param[in] height The height of the image in pixels.
193 * @param[in] fittingMode The mode to use when scaling the image to fit the desired dimensions.
195 ImageActor CreateImageActor(const std::string& filename, unsigned int width, unsigned int height, Dali::FittingMode::Type fittingMode )
197 Image img = CreateImage( filename, width, height, fittingMode );
198 ImageActor actor = ImageActor::New( img );
199 actor.SetName( filename );
200 actor.SetParentOrigin(ParentOrigin::CENTER);
201 actor.SetAnchorPoint(AnchorPoint::CENTER);
206 /** Cycle the scaling mode options. */
207 Dali::FittingMode::Type NextMode( const Dali::FittingMode::Type oldMode )
209 Dali::FittingMode::Type newMode = FittingMode::SHRINK_TO_FIT;
212 case FittingMode::SHRINK_TO_FIT:
213 newMode = FittingMode::SCALE_TO_FILL;
215 case FittingMode::SCALE_TO_FILL:
216 newMode = FittingMode::FIT_WIDTH;
218 case FittingMode::FIT_WIDTH:
219 newMode = FittingMode::FIT_HEIGHT;
221 case FittingMode::FIT_HEIGHT:
222 newMode = FittingMode::SHRINK_TO_FIT;
229 * Bundle an image path with the rectangle to pack it into.
231 struct ImageConfiguration
233 ImageConfiguration( const char * const path, const Vector2 dimensions ) :
235 dimensions( dimensions )
242 * Post-layout image data.
244 struct PositionedImage
246 PositionedImage(ImageConfiguration& configuration, unsigned cellX, unsigned cellY, Vector2 imageGridDims) :
247 configuration( configuration ),
250 imageGridDims( imageGridDims )
253 ImageConfiguration configuration;
256 Vector2 imageGridDims;
262 * @brief The main class of the demo.
264 class ImageScalingIrregularGridController : public ConnectionTracker
268 ImageScalingIrregularGridController( Application& application )
269 : mApplication( application ),
272 std::cout << "ImageScalingIrregularGridController::ImageScalingIrregularGridController" << std::endl;
274 // Connect to the Application's Init signal
275 mApplication.InitSignal().Connect( this, &ImageScalingIrregularGridController::Create );
278 ~ImageScalingIrregularGridController()
280 // Nothing to do here.
284 * One-time setup in response to Application InitSignal.
286 void Create( Application& application )
288 std::cout << "ImageScalingIrregularGridController::Create" << std::endl;
290 // Get a handle to the stage:
291 Stage stage = Stage::GetCurrent();
293 // Connect to input event signals:
294 stage.KeyEventSignal().Connect(this, &ImageScalingIrregularGridController::OnKeyEvent);
296 // Hide the indicator bar
297 mApplication.GetWindow().ShowIndicator(Dali::Window::INVISIBLE);
299 // Create a default view with a default tool bar:
300 mContentLayer = DemoHelper::CreateView( mApplication,
307 // Create an image scaling toggle button. (right of toolbar)
308 Image toggleScalingImage = ResourceImage::New( TOGGLE_SCALING_IMAGE );
309 Toolkit::PushButton toggleScalingButton = Toolkit::PushButton::New();
310 toggleScalingButton.SetBackgroundImage( toggleScalingImage );
311 toggleScalingButton.ClickedSignal().Connect( this, &ImageScalingIrregularGridController::OnToggleScalingTouched );
312 mToolBar.AddControl( toggleScalingButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING );
314 SetTitle( APPLICATION_TITLE );
316 // Build the main content of the widow:
317 PopulateContentLayer( DEFAULT_SCALING_MODE );
321 * Build the main part of the application's view.
323 void PopulateContentLayer( const Dali::FittingMode::Type fittingMode )
325 Stage stage = Stage::GetCurrent();
326 Vector2 stageSize = stage.GetSize();
329 Actor imageField = BuildImageField( stageSize.x, GRID_WIDTH, GRID_MAX_HEIGHT, fittingMode, fieldHeight );
331 mScrollView = ScrollView::New();
333 mScrollView.ScrollStartedSignal().Connect( this, &ImageScalingIrregularGridController::OnScrollStarted );
334 mScrollView.ScrollCompletedSignal().Connect( this, &ImageScalingIrregularGridController::OnScrollCompleted );
336 mScrollView.SetAnchorPoint(AnchorPoint::CENTER);
337 mScrollView.SetParentOrigin(ParentOrigin::CENTER);
339 mScrollView.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
341 mScrollView.SetAxisAutoLock( true );
342 mScrollView.SetAxisAutoLockGradient( 1.0f );
344 // Restrict scrolling to mostly vertical only, but with some horizontal wiggle-room:
346 RulerPtr rulerX = new FixedRuler( stageSize.width ); //< Pull the view back to the grid's centre-line when touch is release using a snapping ruler.
347 rulerX->SetDomain( RulerDomain( stageSize.width * -0.125f, stageSize.width * 1.125f ) ); //< Scroll slightly left/right of image field.
348 mScrollView.SetRulerX ( rulerX );
350 RulerPtr rulerY = new DefaultRuler(); //< Snap in multiples of a screen / stage height
351 rulerY->SetDomain( RulerDomain( - fieldHeight * 0.5f + stageSize.height * 0.5f - GRID_CELL_PADDING, fieldHeight * 0.5f + stageSize.height * 0.5f + GRID_CELL_PADDING ) );
352 mScrollView.SetRulerY ( rulerY );
354 mContentLayer.Add( mScrollView );
355 mScrollView.Add( imageField );
356 mGridActor = imageField;
358 // Create the scroll bar
359 mScrollBarVertical = ScrollBar::New(Toolkit::ScrollBar::Vertical);
360 mScrollBarVertical.SetParentOrigin(ParentOrigin::TOP_RIGHT);
361 mScrollBarVertical.SetAnchorPoint(AnchorPoint::TOP_RIGHT);
362 mScrollBarVertical.SetResizePolicy(Dali::ResizePolicy::FILL_TO_PARENT, Dali::Dimension::HEIGHT);
363 mScrollBarVertical.SetResizePolicy(Dali::ResizePolicy::FIT_TO_CHILDREN, Dali::Dimension::WIDTH);
364 mScrollView.Add(mScrollBarVertical);
366 mScrollBarHorizontal = ScrollBar::New(Toolkit::ScrollBar::Horizontal);
367 mScrollBarHorizontal.SetParentOrigin(ParentOrigin::BOTTOM_LEFT);
368 mScrollBarHorizontal.SetAnchorPoint(AnchorPoint::TOP_LEFT);
369 mScrollBarHorizontal.SetResizePolicy(Dali::ResizePolicy::FIT_TO_CHILDREN, Dali::Dimension::WIDTH);
370 mScrollBarHorizontal.SetOrientation(Quaternion(Radian( 1.5f * Math::PI ), Vector3::ZAXIS));
371 mScrollView.Add(mScrollBarHorizontal);
373 mScrollView.OnRelayoutSignal().Connect( this, &ImageScalingIrregularGridController::OnScrollViewRelayout );
375 // Scroll to top of grid so first images loaded are on-screen:
376 mScrollView.ScrollTo( Vector2( 0, -1000000 ) );
379 void OnScrollViewRelayout(Actor actor)
381 // Make the height of the horizontal scroll bar to be the same as the width of scroll view.
382 mScrollBarHorizontal.SetSize(Vector2(0.0f, mScrollView.GetRelayoutSize( Dimension::WIDTH) ));
386 * Build a field of images scaled into a variety of shapes from very wide,
387 * through square, to very tall. The images are direct children of the Dali::Actor
390 Actor BuildImageField( const float fieldWidth,
391 const unsigned gridWidth,
392 const unsigned maxGridHeight,
393 Dali::FittingMode::Type fittingMode,
394 float & outFieldHeight )
396 // Generate the list of image configurations to be fitted into the field:
398 std::vector<ImageConfiguration> configurations;
399 configurations.reserve( NUM_IMAGE_PATHS * NUM_IMAGE_SIZES );
400 for( unsigned imageIndex = 0; imageIndex < NUM_IMAGE_PATHS; ++imageIndex )
402 for( unsigned dimensionsIndex = 0; dimensionsIndex < NUM_IMAGE_SIZES; ++ dimensionsIndex )
404 configurations.push_back( ImageConfiguration( IMAGE_PATHS[imageIndex], IMAGE_SIZES[dimensionsIndex] ) );
407 // Stir-up the list to get some nice irregularity in the generated field:
408 std::random_shuffle( configurations.begin(), configurations.end() );
409 std::random_shuffle( configurations.begin(), configurations.end() );
411 // Place the images in the grid:
413 std::vector<ImageConfiguration>::iterator config, end;
414 GridFlags grid( gridWidth, maxGridHeight );
415 std::vector<PositionedImage> placedImages;
417 for( config = configurations.begin(), end = configurations.end(); config != end; ++config )
419 unsigned cellX, cellY;
420 Vector2 imageGridDims;
422 // Allocate a region of the grid for the image:
423 bool allocated = grid.AllocateRegion( config->dimensions, cellX, cellY, imageGridDims );
426 #ifdef DEBUG_PRINT_DIAGNOSTICS
427 fprintf( stderr, "Failed to allocate image in grid with dims (%f, %f) and path: %s.\n", config->dimensions.x, config->dimensions.y, config->path );
432 placedImages.push_back( PositionedImage( *config, cellX, cellY, imageGridDims ) );
434 DALI_ASSERT_DEBUG( grid.DebugCheckGridValid() && "Cells were set more than once, indicating erroneous overlap in placing images on the grid." );
435 const unsigned actualGridHeight = grid.GetHighestUsedRow() + 1;
437 // Take the images images in the grid and turn their logical locations into
438 // coordinates in a frame defined by a parent actor:
440 Actor gridActor = Actor::New();
441 gridActor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
442 gridActor.SetParentOrigin( ParentOrigin::CENTER );
443 gridActor.SetAnchorPoint( AnchorPoint::CENTER );
445 // Work out the constants of the grid and cell dimensions and positions:
446 const float cellWidth = fieldWidth / gridWidth;
447 const float cellHeight = cellWidth / CELL_ASPECT_RATIO;
448 const Vector2 cellSize = Vector2( cellWidth, cellHeight );
449 outFieldHeight = actualGridHeight * cellHeight;
450 const Vector2 gridOrigin = Vector2( -fieldWidth * 0.5f, -outFieldHeight * 0.5 );
452 // Build the image actors in their right locations in their parent's frame:
453 for( std::vector<PositionedImage>::const_iterator i = placedImages.begin(), end = placedImages.end(); i != end; ++i )
455 const PositionedImage& imageSource = *i;
456 const Vector2 imageSize = imageSource.imageGridDims * cellSize - Vector2( GRID_CELL_PADDING * 2, GRID_CELL_PADDING * 2 );
457 const Vector2 imageRegionCorner = gridOrigin + cellSize * Vector2( imageSource.cellX, imageSource.cellY );
458 const Vector2 imagePosition = imageRegionCorner + Vector2( GRID_CELL_PADDING , GRID_CELL_PADDING ) + imageSize * 0.5f;
460 ImageActor image = CreateImageActor( imageSource.configuration.path, imageSize.x, imageSize.y, fittingMode );
461 image.SetPosition( Vector3( imagePosition.x, imagePosition.y, 0 ) );
462 image.SetSize( imageSize );
463 image.TouchedSignal().Connect( this, &ImageScalingIrregularGridController::OnTouchImage );
464 mFittingModes[image.GetId()] = fittingMode;
465 mSizes[image.GetId()] = imageSize;
467 gridActor.Add( image );
474 * Upon Touching an image (Release), change its scaling mode and make it spin, provided we're not scrolling.
475 * @param[in] actor The actor touched
476 * @param[in] event The TouchEvent.
478 bool OnTouchImage( Actor actor, const TouchEvent& event )
480 if( (event.points.size() > 0) && (!mScrolling) )
482 TouchPoint point = event.points[0];
483 if(point.state == TouchPoint::Up)
485 // Spin the image a few times:
486 Animation animation = Animation::New(SPIN_DURATION);
487 animation.AnimateBy( Property( actor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f * SPIN_DURATION) ), Vector3::XAXIS ), AlphaFunction::EASE_OUT );
490 // Change the scaling mode:
491 const unsigned id = actor.GetId();
492 Dali::FittingMode::Type newMode = NextMode( mFittingModes[id] );
493 const Vector2 imageSize = mSizes[actor.GetId()];
495 ImageActor imageActor = ImageActor::DownCast( actor );
496 Image oldImage = imageActor.GetImage();
497 Image newImage = CreateImage( ResourceImage::DownCast(oldImage).GetUrl(), imageSize.width + 0.5f, imageSize.height + 0.5f, newMode );
498 imageActor.SetImage( newImage );
499 mFittingModes[id] = newMode;
506 * Main key event handler.
507 * Quit on escape key.
509 void OnKeyEvent(const KeyEvent& event)
511 if( event.state == KeyEvent::Down )
513 if( IsKey( event, Dali::DALI_KEY_ESCAPE )
514 || IsKey( event, Dali::DALI_KEY_BACK ) )
522 * Signal handler, called when the 'Scaling' button has been touched.
524 * @param[in] button The button that was pressed.
526 bool OnToggleScalingTouched( Button button )
528 const unsigned numChildren = mGridActor.GetChildCount();
530 for( unsigned i = 0; i < numChildren; ++i )
532 ImageActor gridImageActor = ImageActor::DownCast( mGridActor.GetChildAt( i ) );
535 // Cycle the scaling mode options:
536 const Vector2 imageSize = mSizes[gridImageActor.GetId()];
537 Dali::FittingMode::Type newMode = NextMode( mFittingModes[gridImageActor.GetId()] );
538 Image oldImage = gridImageActor.GetImage();
539 Image newImage = CreateImage(ResourceImage::DownCast(oldImage).GetUrl(), imageSize.width, imageSize.height, newMode );
540 gridImageActor.SetImage( newImage );
542 mFittingModes[gridImageActor.GetId()] = newMode;
544 SetTitle( std::string( newMode == FittingMode::SHRINK_TO_FIT ? "SHRINK_TO_FIT" : newMode == FittingMode::SCALE_TO_FILL ? "SCALE_TO_FILL" : newMode == FittingMode::FIT_WIDTH ? "FIT_WIDTH" : "FIT_HEIGHT" ) );
551 * Sets/Updates the title of the View
552 * @param[in] title The new title for the view.
554 void SetTitle(const std::string& title)
558 mTitleActor = DemoHelper::CreateToolBarLabel( "" );
559 // Add title to the tool bar.
560 mToolBar.AddControl( mTitleActor, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarTitlePercentage, Alignment::HorizontalCenter );
563 mTitleActor.SetProperty( TextLabel::Property::TEXT, title );
567 * When scroll starts (i.e. user starts to drag scrollview),
568 * note this state (mScrolling = true)
569 * @param[in] position Current Scroll Position
571 void OnScrollStarted( const Vector2& position )
577 * When scroll starts (i.e. user stops dragging scrollview, and scrollview has snapped to destination),
578 * note this state (mScrolling = false).
579 * @param[in] position Current Scroll Position
581 void OnScrollCompleted( const Vector2& position )
587 Application& mApplication;
589 Layer mContentLayer; ///< The content layer (contains non gui chrome actors)
590 Toolkit::Control mView; ///< The View instance.
591 Toolkit::ToolBar mToolBar; ///< The View's Toolbar.
592 TextLabel mTitleActor; ///< The Toolbar's Title.
593 Actor mGridActor; ///< The container for the grid of images
594 ScrollView mScrollView; ///< ScrollView UI Component
595 ScrollBar mScrollBarVertical;
596 ScrollBar mScrollBarHorizontal;
597 bool mScrolling; ///< ScrollView scrolling state (true = scrolling, false = stationary)
598 std::map<unsigned, Dali::FittingMode::Type> mFittingModes; ///< Stores the current scaling mode of each image, keyed by image actor id.
599 std::map<unsigned, Vector2> mSizes; ///< Stores the current size of each image, keyed by image actor id.
602 void RunTest( Application& application )
604 ImageScalingIrregularGridController test( application );
606 application.MainLoop();
609 /** Entry point for Linux & Tizen applications */
610 int main( int argc, char **argv )
612 Application application = Application::New( &argc, &argv, DALI_DEMO_THEME_PATH );
614 RunTest( application );