本文整理汇总了C++中JXWindowPainter::Image方法的典型用法代码示例。如果您正苦于以下问题:C++ JXWindowPainter::Image方法的具体用法?C++ JXWindowPainter::Image怎么用?C++ JXWindowPainter::Image使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JXWindowPainter
的用法示例。
在下文中一共展示了JXWindowPainter::Image方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
void
JXTabGroup::DrawCloseButton
(
const JIndex index,
JXWindowPainter& p,
const JRect& rect
)
{
if (index != itsMouseIndex)
{
return;
}
else if (!TabCanClose(index))
{
itsCloseRect.Set(0,0,0,0);
return;
}
if (itsEdge == kTop || itsEdge == kBottom)
{
itsCloseRect.top = rect.ycenter() - itsCloseImage->GetHeight()/2;
itsCloseRect.bottom = itsCloseRect.top + itsCloseImage->GetHeight();
itsCloseRect.right = rect.right - kCloseMarginWidth;
itsCloseRect.left = itsCloseRect.right - itsCloseImage->GetWidth();
}
else if (itsEdge == kLeft)
{
itsCloseRect.top = rect.top + kCloseMarginWidth;
itsCloseRect.bottom = itsCloseRect.top + itsCloseImage->GetHeight();
itsCloseRect.left = rect.xcenter() - itsCloseImage->GetWidth()/2;
itsCloseRect.right = itsCloseRect.left + itsCloseImage->GetWidth();
}
else // itsEdge == kRight
{
itsCloseRect.bottom = rect.bottom - kCloseMarginWidth;
itsCloseRect.top = itsCloseRect.bottom - itsCloseImage->GetHeight();
itsCloseRect.left = rect.xcenter() - itsCloseImage->GetWidth()/2;
itsCloseRect.right = itsCloseRect.left + itsCloseImage->GetWidth();
}
if (itsClosePushedFlag)
{
p.Image(*itsClosePushedImage, itsClosePushedImage->GetBounds(), itsCloseRect);
}
else
{
p.Image(*itsCloseImage, itsCloseImage->GetBounds(), itsCloseRect);
}
}
示例2: GetBounds
void
JXImageWidget::Draw
(
JXWindowPainter& p,
const JRect& rect
)
{
if (itsImage != NULL)
{
p.Image(*itsImage, itsImage->GetBounds(), GetBounds());
}
}