本文整理汇总了C++中Canvas::DrawNinePatchedBitmap方法的典型用法代码示例。如果您正苦于以下问题:C++ Canvas::DrawNinePatchedBitmap方法的具体用法?C++ Canvas::DrawNinePatchedBitmap怎么用?C++ Canvas::DrawNinePatchedBitmap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Canvas
的用法示例。
在下文中一共展示了Canvas::DrawNinePatchedBitmap方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnDraw
result MessageDocElement::OnDraw() {
Canvas *pCanvas = GetCanvasN();
if (pCanvas) {
pCanvas->DrawNinePatchedBitmap(pCanvas->GetBounds(), *_pBitmap);
delete pCanvas;
}
return E_SUCCESS;
}
示例2: OnDraw
result MessageBubble::OnDraw(void) {
result r = E_SUCCESS;
Canvas* pCanvas = GetCanvasN();
Dimension screenSize = GetSize();
Bitmap* pBubble;
pBubble = (out == 1) ? pBubbleOut : pBubbleIn;
// TODO: paddigns
r = pCanvas->DrawNinePatchedBitmap(Rectangle(0, 0, screenSize.width, screenSize.height), *pBubble);
TryCatch(r == E_SUCCESS, , "Failed DrawNinePatchedBitmap");
delete pCanvas;
return r;
CATCH:
AppLogException("$${Function:OnDraw} is failed.", GetErrorMessage(r));
delete pCanvas;
return r;
}