return Scene(internal.Get());
}
+Scene Scene::New(Size size, int orientation)
+{
+ Internal::ScenePtr internal = Internal::Scene::New(size, orientation);
+ return Scene(internal.Get());
+}
+
Scene Scene::DownCast(BaseHandle handle)
{
return Scene(dynamic_cast<Dali::Internal::Scene*>(handle.GetObjectPtr()));
static Scene New(Size size);
/**
+ * @brief Create an initialized Scene handle.
+ *
+ * @param[in] size The size of the set surface for this scene
+ * @param[in] orientation The orientation of the set surface for this scene
+ *
+ * @return a handle to a newly allocated Dali resource.
+ */
+ static Scene New( Size size, int orientation );
+
+ /**
* @brief Downcast an Object handle to Scene handle.
*
* If handle points to a Scene object the downcast produces
ScenePtr scene = new Scene;
// Second-phase construction
- scene->Initialize( size );
+ scene->Initialize( size, 0 );
+
+ return scene;
+}
+
+ScenePtr Scene::New( Size size, int orientation )
+{
+ ScenePtr scene = new Scene;
+
+ // Second-phase construction
+ scene->Initialize( size, orientation );
return scene;
}
// When this destructor is called, the scene has either already been removed from Core or Core has already been destroyed
}
-void Scene::Initialize( Size size )
+void Scene::Initialize( Size size, int orientation )
{
ThreadLocalStorage* tls = ThreadLocalStorage::GetInternal();
// Create the default render-task and ensure clear is enabled on it to show the background color
RenderTaskPtr renderTask = mRenderTaskList->CreateTask( mRootLayer.Get(), mDefaultCamera.Get() );
renderTask->SetClearEnabled(true);
+ mSurfaceOrientation = orientation;
SurfaceResized( size.width, size.height, mSurfaceOrientation, false );
static ScenePtr New( Size size );
/**
+ * @copydoc Dali::Integration::Scene::New
+ */
+ static ScenePtr New( Size size, int orientation );
+
+ /**
* virtual destructor
*/
~Scene() override;
* Second-phase constructor.
*
* @param[in] size The size of the set surface
+ * @param[in] orientation The orientation of the set surface for this scene
*/
- void Initialize( Size size );
+ void Initialize( Size size, int orientation );
// Undefined
Scene(const Scene&) = delete;