From: Bongjoo Seo Date: Sat, 23 Mar 2013 07:39:16 +0000 (+0900) Subject: Adding multi-window support to DumpVeLayout() X-Git-Tag: accepted/tizen_2.1/20130425.033138~761^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6833605b7ba183a1d0f63f9ddaaad077600629ac;p=framework%2Fosp%2Fuifw.git Adding multi-window support to DumpVeLayout() Change-Id: I36e9aa5251eba86860d57a64b851102be2f47f12 Signed-off-by: Bongjoo Seo --- diff --git a/src/ui/animations/FUiAnim_Debug.cpp b/src/ui/animations/FUiAnim_Debug.cpp index 8e32cc5..8d138a9 100644 --- a/src/ui/animations/FUiAnim_Debug.cpp +++ b/src/ui/animations/FUiAnim_Debug.cpp @@ -57,6 +57,7 @@ #endif #include "FUiAnim_EflNode.h" +#include "FUiAnim_EflLayer.h" #include "FUiAnim_AnimationManager.h" #include "FUiAnim_DisplayManager.h" @@ -266,11 +267,20 @@ _VeDebug::DumpVisualElementLayout(_VisualElementImpl* pElement, FILE* pFile) evas_object_geometry_get(pEvasObject, &absolute.x, &absolute.y, &absolute.width, &absolute.height); FloatRectangle realBounds = pElement->__bounds; + _RootVisualElement* pRoot = dynamic_cast<_RootVisualElement*>(pElement->__pPublicInstance); + if (pRoot) + { + _NativeLayer* pLayer = pRoot->GetNativeLayer(); + FloatRectangle rect = pLayer->GetBounds(); + realBounds.x += rect.x; + realBounds.y += rect.y; + } _VisualElementCoordinateSystem::ConvertDimensionToPhysical(realBounds.width, realBounds.height); _VisualElementCoordinateSystem::MakeIntegralPoint(realBounds.width, realBounds.height, relative.width, relative.height); _VisualElementCoordinateSystem::ConvertPointToPhysical(realBounds.x, realBounds.y); _VisualElementCoordinateSystem::MakeIntegralPoint(realBounds.x, realBounds.y, relative.x, relative.y); + bool showState = pElement->GetShowState(); bool visible = pElement->IsVisible(); bool evasVisible = evas_object_visible_get(pEvasObject); @@ -298,7 +308,7 @@ _VeDebug::DumpVisualElementLayout(_VisualElementImpl* pElement, FILE* pFile) } // save the image file - strncpy(savePath, "/tmp/", 5); + strncpy(savePath, "/tmp/layout/", 12); strncat(savePath, filename, strlen(filename)); evas_object_image_save(pEvasObjectImage, savePath, NULL, "quality=100 compress=9"); @@ -1467,7 +1477,9 @@ DumpVeLayout(void) { Tizen::Ui::Animations::_DisplayManager* pDisplayManager = Tizen::Ui::Animations::_DisplayManager::GetInstance(); - FILE* pFile = fopen("/tmp/layout.html", "w"); + system("rm -rf /tmp/layout"); + system("mkdir /tmp/layout"); + FILE* pFile = fopen("/tmp/layout/layout.html", "w"); fprintf(pFile, "\n"); fprintf(pFile, "
Model
\n"); fprintf(pFile, "
\n"); diff --git a/src/ui/animations/FUiAnim_EflLayer.cpp b/src/ui/animations/FUiAnim_EflLayer.cpp index 5ab7676..819a6a5 100644 --- a/src/ui/animations/FUiAnim_EflLayer.cpp +++ b/src/ui/animations/FUiAnim_EflLayer.cpp @@ -458,7 +458,9 @@ _EflLayer::GetBounds(void) const int y = 0; int w = 0; int h = 0; - evas_object_geometry_get(_pWindow, &x, &y, &w, &h); + + evas_object_geometry_get(_pWindow, null, null, &w, &h); + elm_win_screen_position_get(_pWindow, &x, &y); return FloatRectangle(x, y, w, h); }