__pVisualElementBounds = new (std::nothrow) VisualElement();
__pVisualElementBounds->Construct();
__pVisualElementBounds->SetName(L"Grow");
- __pVisualElementBounds->SetBounds(FloatRectangle((__rect.width / 2.0f) - 75.0f, (__rect.height / 2.0f) - 75.0f, 150.0f, 150.0f));
+ __pVisualElementBounds->SetBounds(FloatRectangle((__rect.width / 2.0f) - 121.0f, __rect.height - 794.0f, 242.0f, 242.0f));
__pVisualElementBounds->SetShowState(true);
__pVisualElementBounds->SetImplicitAnimationEnabled(false);
__pVisualElement->AttachChild(*__pVisualElementBounds);
__endRect = __pVisualElementBounds->GetBounds();
- __startRect = FloatRectangle(__endRect.x + 75.0f, __endRect.y + 75.0f, 0, 0);
+ __startRect = FloatRectangle(__endRect.x + 121.0f, __endRect.y + 121.0f, 0, 0);
std::unique_ptr<Canvas> pCanvas(__pVisualElementBounds->GetCanvasN());
SysTryReturnResult(NID_NET_NFC, pCanvas != null, E_OUT_OF_MEMORY, "Failed to get canvas.");
+
+ std::unique_ptr<Bitmap> pBitmap;
+ Image image;
+
+ r = image.Construct();
+ SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to construct an Image instance.");
+
+ // decode the bitmap
+ String iconPath = App::GetInstance()->GetAppRootPath() + L"res/bounds.png";
+ pBitmap.reset(image.DecodeN(iconPath, BITMAP_PIXEL_FORMAT_ARGB8888));
+ SysTryReturnResult(NID_NET_NFC, pBitmap != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
+
+ // scale the bitmap
+ r = pBitmap->Scale(Dimension(242, 242));
+ SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to scale the bitmap.");
+
+ // draw the bitmap
pCanvas->SetBackgroundColor(Color(0x00000000));
pCanvas->Clear();
- pCanvas->SetForegroundColor(Color::GetColor(COLOR_ID_GREY));
- pCanvas->SetLineStyle(LINE_STYLE_SOLID);
- pCanvas->SetLineWidth(6);
- pCanvas->DrawEllipse(Rectangle(25, 25, 100, 100));
- pCanvas->SetLineWidth(4);
- pCanvas->DrawEllipse(Rectangle(15, 15, 120, 120));
- pCanvas->SetLineWidth(2);
- pCanvas->DrawEllipse(Rectangle(5, 5, 140, 140));
+ r = pCanvas->DrawBitmap(Point(__rect.x, __rect.y), *pBitmap);
+ SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to draw the bitmap.");
__pVisualElementBounds->SetBounds(__startRect);
__pVisualElementOpacity = new (std::nothrow) VisualElement();
__pVisualElementOpacity->Construct();
__pVisualElementOpacity->SetName(L"Opacity");
- __pVisualElementOpacity->SetBounds(FloatRectangle((__rect.width / 2) - 50, (__rect.height / 2) - 50, 100, 100));
+ __pVisualElementOpacity->SetBounds(FloatRectangle((__rect.width / 2) - 53, __rect.height - 726, 106, 106));
__pVisualElementOpacity->SetShowState(true);
__pVisualElementOpacity->SetImplicitAnimationEnabled(false);
__pVisualElement->AttachChild(*__pVisualElementOpacity);
pCanvas.reset(__pVisualElementOpacity->GetCanvasN());
SysTryReturnResult(NID_NET_NFC, pCanvas != null, E_OUT_OF_MEMORY, "Failed to get canvas.");
- std::unique_ptr<Bitmap> pBitmap;
- Image image;
-
- r = image.Construct();
- SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to construct an Image instance.");
-
// decode the bitmap
pBitmap.reset(image.DecodeN(__iconPath, BITMAP_PIXEL_FORMAT_ARGB8888));
SysTryReturnResult(NID_NET_NFC, pBitmap != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
// scale the bitmap
- r = pBitmap->Scale(Dimension(100, 100));
+ r = pBitmap->Scale(Dimension(106, 106));
SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to scale the bitmap.");
__startOpacity = 0.0f;
std::unique_ptr<TextElement> pTextElement(new (std::nothrow) TextElement());
SysTryReturnResult(NID_NET_NFC, pTextElement != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
- r = pEnrichedText->Construct(Dimension(textAreaWidth, 200));
+ r = pEnrichedText->Construct(Dimension(textAreaWidth, 100));
SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to construct an enriched text.");
pEnrichedText->SetHorizontalAlignment(TEXT_ALIGNMENT_CENTER);
pTextElement->SetTextColor(Color::GetColor(COLOR_ID_WHITE));
{
Font font;
- font.Construct(FONT_STYLE_BOLD, 40);
+ font.Construct(FONT_STYLE_BOLD, 42);
pTextElement->SetFont(font);
}
SysTryReturnResult(NID_NET_NFC, pCanvas != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
// Draws the EnrichedText at the specified Point
- pCanvas->DrawText(Point(0, (rect.height / 2) + 100), *pEnrichedText);
+ pCanvas->DrawText(Point(0, rect.height - 510), *pEnrichedText);
return r;
}
pTextElement->SetTextColor(Color::GetColor(COLOR_ID_WHITE));
{
Font font;
- font.Construct(FONT_STYLE_BOLD, 40);
+ font.Construct(FONT_STYLE_BOLD, 42);
pTextElement->SetFont(font);
}
SysTryReturnResult(NID_NET_NFC, pCanvas != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
// Draws the EnrichedText at the specified Point
- r = pCanvas->DrawText(Point((rect.width - textAreaWidth) / 2, (int)(rect.height / 4)), *pEnrichedText);
+ r = pCanvas->DrawText(Point((rect.width - textAreaWidth) / 2, rect.height -1030), *pEnrichedText);
SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to draw text to canvas.");
return r;
{
if (keyName == L"opacity")
{
- float margin = (__endRect.width * 0.2f) / 2;
+ float margin = (__endRect.width * 0.05f) / 2;
__startRect = __endRect;
__endRect = FloatRectangle(__startRect.x - margin, __startRect.y - margin,
__startRect.width + (margin * 2), __startRect.height + (margin * 2));
// reset the circles size
__startRect = __endRect;
- __endRect = FloatRectangle(__startRect.x + 90.0f, __startRect.y + 90.0f, 0, 0);
+ __endRect = FloatRectangle(__startRect.x + 127.05f, __startRect.y + 127.05f, 0, 0);
// play animation
AnimationTransaction::Begin();