本文整理汇总了C++中CBCGPRect::IntersectRect方法的典型用法代码示例。如果您正苦于以下问题:C++ CBCGPRect::IntersectRect方法的具体用法?C++ CBCGPRect::IntersectRect怎么用?C++ CBCGPRect::IntersectRect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBCGPRect
的用法示例。
在下文中一共展示了CBCGPRect::IntersectRect方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnDraw
//********************************************************************************
void CBCGPTreeMapGroup::OnDraw(CBCGPGraphicsManager* pGM, const CBCGPRect& rectClip, const CBCGPBrush& brBorder)
{
ASSERT_VALID(pGM);
if (m_rect.IsRectEmpty())
{
return;
}
CBCGPRect rectInter;
if (!rectInter.IntersectRect(m_rect, rectClip))
{
return;
}
if (!m_rectCaption.IsRectEmpty())
{
pGM->FillRectangle(m_rectCaption, m_brFillCaption);
DrawTextWidthShadow(pGM, m_strLabel, m_rectCaption, m_brText, m_tf);
}
int nSubNodes = (int)m_arSubNodes.GetSize();
for (int i = 0; i < nSubNodes; i++)
{
m_arSubNodes[i]->OnDraw(pGM, rectClip, brBorder);
}
}
示例2: OnCalcBoundingRect
//*******************************************************************************
CBCGPRect CBCGPChartObject::OnCalcBoundingRect()
{
if (m_pXAxis == NULL && m_pYAxis == NULL || m_coordinateMode == CM_AXIS_OUTSIDE_MARK || m_coordinateMode == CM_AXIS_INSIDE_MARK ||
m_pXAxis != NULL && !m_pXAxis->m_bInitialized)
{
return m_pParentChart->GetRect();
}
CBCGPRect rectXAxis;
CBCGPRect rectYAxis;
if (m_pXAxis != NULL)
{
rectXAxis = m_pXAxis->GetBoundingRect();
}
if (m_pYAxis != NULL)
{
rectYAxis = m_pYAxis->GetBoundingRect();
}
if (!rectXAxis.IsRectEmpty() && !rectYAxis.IsRectEmpty())
{
rectXAxis.IntersectRect(rectYAxis);
if (rectXAxis.IsRectEmpty())
{
return rectYAxis;
}
}
else if (rectXAxis.IsRectEmpty())
{
return rectYAxis;
}
return rectXAxis;
}