From 1e1035e9c24af1fadbfdd1db48adc6f52b52532b Mon Sep 17 00:00:00 2001 From: Wonsik Jung Date: Tue, 4 Feb 2025 16:02:50 +0900 Subject: [PATCH] The modified window example to test window coordiantes. The modified window example to test window coordinates for window rotation Change-Id: Ie536cd5377f02d93796eb75b340d9ce35dc4b4d4 --- examples/window/window-example.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/examples/window/window-example.cpp b/examples/window/window-example.cpp index b914f139e..0b17b30dd 100644 --- a/examples/window/window-example.cpp +++ b/examples/window/window-example.cpp @@ -182,6 +182,9 @@ public: void OnWindowOrientationChanged(Dali::Window window, Dali::WindowOrientation orientation) { DALI_LOG_RELEASE_INFO("OnWindowOrientationChanged, changed window orientation: %d\n", orientation); + Dali::Window::WindowPosition position = window.GetPosition(); + Dali::Window::WindowSize size= window.GetSize(); + DALI_LOG_RELEASE_INFO("OnWindowOrientationChanged, x:%d, y:%d, w:%d, h:%d\n", position.GetX(), position.GetY(), size.GetWidth(), size.GetHeight()); } void OnWindowResized(Dali::Window winHandle, Dali::Window::WindowSize size) @@ -412,6 +415,10 @@ public: DALI_LOG_RELEASE_INFO("Move/Resize Test ::: window move and resize (10, 10) (600 x 400)\n"); PositionSize windowPosition(10, 10, 600, 400); DevelWindow::SetPositionSize(window, windowPosition); + + Dali::Window::WindowPosition position = window.GetPosition(); + Dali::Window::WindowSize size = window.GetSize(); + DALI_LOG_RELEASE_INFO("Check Converted window position/size, x:%d, y:%d, w:%d, h:%d\n", position.GetX(), position.GetY(), size.GetWidth(), size.GetHeight()); } else if(event.GetKeyName() == "2") { -- 2.34.1