/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
#include <dali/devel-api/adaptor-framework/pixel-buffer.h>
#include <dali-toolkit/dali-toolkit.h>
#include <dali-toolkit/devel-api/text/text-utils-devel.h>
-#include <devel-api/adaptor-framework/image-loading.h>
+#include <dali/devel-api/adaptor-framework/image-loading.h>
using namespace std;
using namespace Dali;
*/
void Create( Application& application )
{
- Stage stage = Stage::GetCurrent();
- stage.SetBackgroundColor( Color::WHITE );
- stage.SetBackgroundColor( Vector4( 0.04f, 0.345f, 0.392f, 1.0f ) );
+ Window window = application.GetWindow();
+ window.SetBackgroundColor( Color::WHITE );
+ window.SetBackgroundColor( Vector4( 0.04f, 0.345f, 0.392f, 1.0f ) );
- stage.KeyEventSignal().Connect(this, &SimpleTextRendererExample::OnKeyEvent);
+ window.KeyEventSignal().Connect(this, &SimpleTextRendererExample::OnKeyEvent);
const std::string image1 = "<item 'width'=26 'height'=26 'url'='" + IMAGE1 + "'/>";
const std::string image2 = "<item 'width'=26 'height'=26/>";
renderer.SetTextures( textureSet );
Actor actor = Actor::New();
- actor.SetAnchorPoint( AnchorPoint::CENTER );
- actor.SetParentOrigin( ParentOrigin::CENTER );
- actor.SetPosition( 0.f, 0.f);
- actor.SetSize( 360.f, 360.f );
- actor.SetColor( Color::WHITE );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ actor.SetProperty( Actor::Property::POSITION, Vector2( 0.f, 0.f));
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 360.f, 360.f ) );
+ actor.SetProperty( Actor::Property::COLOR, Color::WHITE );
actor.AddRenderer( renderer );
- stage.Add( actor );
+ window.Add( actor );
}
/**
};
/** Entry point for Linux & Tizen applications */
-int main( int argc, char **argv )
+int DALI_EXPORT_API main( int argc, char **argv )
{
Application application = Application::New( &argc, &argv );