r = pImpl->SetZOrderGroup(_ControlVisualElement::Z_ORDER_GROUP_CONTROL + 4);
- Canvas* pCanvas = __pDimmingElement->GetCanvasN();
-
- Bitmap* pPortraitBitmap = null;
- Bitmap* pLandscapeBitmap = null;
- r = GET_BITMAP_CONFIG_N(DIMMINGLAYER::BG_PORTRAIT, BITMAP_PIXEL_FORMAT_ARGB8888, pPortraitBitmap);
- r = GET_BITMAP_CONFIG_N(DIMMINGLAYER::BG_LANDSCAPE, BITMAP_PIXEL_FORMAT_ARGB8888, pLandscapeBitmap);
-
- if (__pControl->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)
- {
- if (pCanvas)
- {
- r = pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, size.width, size.height), *pPortraitBitmap);
- }
- }
- else
- {
- if (pCanvas)
- {
- r = pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, size.height, size.width), *pLandscapeBitmap);
- }
- }
-
- delete pCanvas;
-
+ DrawBackgroundBitmap();
}
else
{
{
__pDimmingElement->SetBounds(Tizen::Graphics::FloatRectangle(0.0f, 0.0f, size.height, size.width));
}
+
+ DrawBackgroundBitmap();
+
__pDimmingElement->SetImplicitAnimationEnabled(oldValue);
return r;
}
+result
+_DimmingLayer::DrawBackgroundBitmap(void)
+{
+ result r = E_SUCCESS;
+
+ const FloatDimension size = _ControlManager::GetInstance()->GetScreenSizeF();
+
+ Bitmap* pPortraitBitmap = null;
+ Bitmap* pLandscapeBitmap = null;
+ r = GET_BITMAP_CONFIG_N(DIMMINGLAYER::BG_PORTRAIT, BITMAP_PIXEL_FORMAT_ARGB8888, pPortraitBitmap);
+ r = GET_BITMAP_CONFIG_N(DIMMINGLAYER::BG_LANDSCAPE, BITMAP_PIXEL_FORMAT_ARGB8888, pLandscapeBitmap);
+ SysTryReturnResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ Canvas* pCanvas = __pDimmingElement->GetCanvasN();
+ r = GetLastResult();
+ SysTryReturnResult(NID_UI_CTRL, pCanvas != null, r, "[%s] Propagating.", GetErrorMessage(r));
+ pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
+ pCanvas->Clear();
+
+ if (__pControl->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ if (pPortraitBitmap)
+ {
+ r = pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, size.width, size.height), *pPortraitBitmap);
+ }
+ }
+ else
+ {
+ if (pLandscapeBitmap)
+ {
+ r = pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, size.height, size.width), *pLandscapeBitmap);
+ }
+ }
+ delete pCanvas;
+
+ return r;
+}
+
}} // Tizen::Ui