Fix for internal issue Canvas was not getting clear
authorShiv Pratap Singh <shivp.singh@samsung.com>
Wed, 30 Oct 2013 12:37:28 +0000 (18:07 +0530)
committerShiv Pratap Singh <shivp.singh@samsung.com>
Wed, 30 Oct 2013 12:52:00 +0000 (18:22 +0530)
Change-Id: Icdf1cd8e159a64d4567562959832bf3947451773
Signed-off-by: Shiv Pratap Singh <shivp.singh@samsung.com>
src/ui/controls/FUiCtrl_InputPadPresenter.cpp

index ed93e3d..d8b38a3 100644 (file)
@@ -287,6 +287,8 @@ _InputPadPresenter::Draw(void)
        r = GetLastResult();
        SysTryReturnResult(NID_UI_CTRL, (pCanvas != null), r, "Propagating.");
 
+       pCanvas->Clear();
+
        bgBounds = pCanvas->GetBoundsF();
 
        if(__pKeypadBackgroundBitmap != null)
@@ -298,10 +300,11 @@ _InputPadPresenter::Draw(void)
                }
                else
                {
+                       bgBounds.x = (bgBounds.width - __pKeypadBackgroundBitmap->GetWidthF()) / 2;
+                       bgBounds.y = (bgBounds.height - __pKeypadBackgroundBitmap->GetHeightF()) / 2;
                        r =  pCanvas->DrawBitmap(FloatPoint(bgBounds.x, bgBounds.y), *__pKeypadBackgroundBitmap);
                        SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
                }
-
        }
 
        r = DrawAllButtons(*pCanvas);