pEvasObjectImage = pSource;
}
evas_object_image_size_get(pEvasObjectImage, &imageSize.width, &imageSize.height);
- evas_object_image_fill_get(pEvasObject, &filled.x, &filled.y, &filled.width, &filled.height);
+ FloatRectangle contentBounds = pElement->__contentBounds;
+ filled.x = realBounds.x * contentBounds.x;
+ filled.y = realBounds.y * contentBounds.y;
+ filled.width = realBounds.width * contentBounds.width;
+ filled.height = realBounds.height * contentBounds.height;
if (name.GetLength() > 0)
{
strncat(savePath, filename, strlen(filename));
evas_object_image_save(pEvasObjectImage, savePath, NULL, "quality=100 compress=9");
- snprintf(style1, LOG_LEN_MAX, "background-image:url(%s); ", filename);
+ snprintf(style1, LOG_LEN_MAX, "background-image:url('%s'); background-size:%dpx %dpx; ", filename, filled.width, filled.height);
snprintf(title1, LOG_LEN_MAX, "%s\nImage: w=%d h=%d\nEvas Absolute Bounds: x=%d y=%d w=%d h=%d\nVE Relative Bounds: x=%d y=%d w=%d h=%d\nFilled Bounds: x=%d y=%d w=%d h=%d\n",
filename, relative.width, relative.height, absolute.x, absolute.y, absolute.width, absolute.height, relative.x, relative.y, relative.width, relative.height, filled.x, filled.y, filled.width, filled.height);
}
{
Tizen::Ui::Animations::_DisplayManager* pDisplayManager = Tizen::Ui::Animations::_DisplayManager::GetInstance();
- system("rm -rf /tmp/layout");
- system("mkdir /tmp/layout");
+ int ret = system("rm -rf /tmp/layout");
+ ret = system("mkdir /tmp/layout");
+ if (ret)
+ {
+ return;
+ }
+
FILE* pFile = fopen("/tmp/layout/layout.html", "w");
fprintf(pFile, "<body>\n");
- fprintf(pFile, "<div style='position:absolute; left:0px; top:0px;'>Model</div>\n");
+ fprintf(pFile, "<div id=\"information_container\" style=\"position:absolute; width:100%%; z-index:0;\"><div id=\"information\" style=\"font-size:9pt; margin:auto; width:350px; z-index:0;\"></div></div>\n");
+ fprintf(pFile, "<div style='position:absolute; left:0px; top:0px;'>Model\n");
fprintf(pFile, "<div style='position:absolute; left:0px; top:30px;'>\n");
// Model
for (int i = 0; i < pDisplayManager->GetRootCount(); i++)
Tizen::Ui::Animations::_VeDebug::DumpVeLayout(pVisualElementImpl, 0, pFile);
}
}
- fprintf(pFile, "</div>\n");
- fprintf(pFile, "<div style='position:absolute; left:1170px; top:0px;'>Presentation</div>\n");
- fprintf(pFile, "<div style='position:absolute; left:1170px; top:30px;'>\n");
+ fprintf(pFile, "</div></div>\n");
+ fprintf(pFile, "<div style='position:absolute; left:62%%; top:0px;'>Presentation\n");
+ fprintf(pFile, "<div style='position:absolute; left:0px; top:30px;'>\n");
// Presentation
for (int i = 0; i < pDisplayManager->GetRootCount(); i++)
}
pDisplayManager->GetRoot(i)->ReleasePresentationInstance();
}
- fprintf(pFile, "</div>\n");
+ fprintf(pFile, "</div></div>\n");
- fprintf(pFile, "<span id=\"information\" style=\"font-size:9pt; position:absolute; left:770px; width:350px;\"></span>\n");
fprintf(pFile, "<script>\n");
fprintf(pFile, "var divs = document.getElementsByTagName('div');\n");
fprintf(pFile, "var oldColor;\n\n");
fprintf(pFile, "for(var i = 0; i < divs.length; i++) {\n");
- fprintf(pFile, " divs[i].addEventListener('mouseover', highlightThis, false);\n");
- fprintf(pFile, " divs[i].addEventListener('mouseout', restoreThis, false);\n");
- fprintf(pFile, " divs[i].addEventListener('click', informThis, false);\n");
- fprintf(pFile, " divs[i].addEventListener('dblclick', removeThis, false);\n");
+ fprintf(pFile, " if (divs[i].id != \"information_container\" && divs[i].id != \"information\")");
+ fprintf(pFile, " {");
+ fprintf(pFile, " divs[i].addEventListener('mouseover', highlightThis, false);\n");
+ fprintf(pFile, " divs[i].addEventListener('mouseout', restoreThis, false);\n");
+ fprintf(pFile, " divs[i].addEventListener('click', informThis, false);\n");
+ fprintf(pFile, " divs[i].addEventListener('dblclick', removeThis, false);\n");
+ fprintf(pFile, " }");
fprintf(pFile, "}\n\n");
fprintf(pFile, "function highlightThis(event) {\n");