/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Toolkit::ToggleButton effectChangeToggleButton = Toolkit::ToggleButton::ToggleButton::New();
effectChangeToggleButton.SetProperty( Toolkit::ToggleButton::Property::STATE_VISUALS,
- Property::Array().Add( EFFECT_WAVE_IMAGE )
- .Add( EFFECT_CROSS_IMAGE)
- .Add( EFFECT_FOLD_IMAGE )
+ Property::Array{ EFFECT_WAVE_IMAGE,
+ EFFECT_CROSS_IMAGE,
+ EFFECT_FOLD_IMAGE }
);
effectChangeToggleButton.ClickedSignal().Connect( this, &CubeTransitionApp::OnEffectButtonClicked );
Texture CubeTransitionApp::LoadStageFillingTexture( const char* filepath )
{
ImageDimensions dimensions( Stage::GetCurrent().GetSize().x, Stage::GetCurrent().GetSize().y );
- BitmapLoader loader = BitmapLoader::New( filepath, dimensions, FittingMode::SCALE_TO_FILL );
- loader.Load();
- PixelData pixelData = loader.GetPixelData();
+ Devel::PixelBuffer pixelBuffer = LoadImageFromFile( filepath, dimensions, FittingMode::SCALE_TO_FILL );
+ PixelData pixelData = Devel::PixelBuffer::Convert(pixelBuffer);
+
Texture texture = Texture::New( TextureType::TEXTURE_2D, pixelData.GetPixelFormat(), pixelData.GetWidth(), pixelData.GetHeight() );
texture.Upload( pixelData );
return texture;
}
}
-// Entry point for Linux & Tizen applications
int DALI_EXPORT_API main( int argc, char **argv )
{
Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );