The modified window example to test window coordiantes. 94/319094/1
authorWonsik Jung <sidein@samsung.com>
Tue, 4 Feb 2025 07:02:50 +0000 (16:02 +0900)
committerWonsik Jung <sidein@samsung.com>
Tue, 4 Feb 2025 07:02:50 +0000 (16:02 +0900)
The modified window example to test window coordinates for window rotation

Change-Id: Ie536cd5377f02d93796eb75b340d9ce35dc4b4d4

examples/window/window-example.cpp

index b914f139e2d2b66c3902fda0f9ec7ca170518519..0b17b30ddc4f5fcfde1513142acd81e25621f10d 100644 (file)
@@ -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")
       {