本文整理汇总了C++中TRegion::Intersects方法的典型用法代码示例。如果您正苦于以下问题:C++ TRegion::Intersects方法的具体用法?C++ TRegion::Intersects怎么用?C++ TRegion::Intersects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TRegion
的用法示例。
在下文中一共展示了TRegion::Intersects方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: IsClipped
CHuiCanvasGc::TClipRectVisibility CHuiCanvasGc::IsClipped(const TRect& aRect, const TRegion& aClippingRegion) const
{
TClipRectVisibility isClipped = EFullyOutside;
if (!aClippingRegion.Count())
{
return EFullyInside;
}
if (!aRect.IsEmpty() && aClippingRegion.Count())
{
#if 0
TBool test = EFalse;
if (test)
{
for (TInt i=0; i<aClippingRegion.Count(); i++)
{
#ifdef _DEBUG
RDebug::Print(_L("aClippingRegion Rect: %d %d %d %d"),
aClippingRegion[i].iTl.iX,
aClippingRegion[i].iTl.iY,
aClippingRegion[i].iBr.iX,
aClippingRegion[i].iBr.iY);
#endif
}
}
#endif
if (aClippingRegion.Intersects(aRect))
{
iTempRegion.Clear();
iTempRegion2.Clear();
iTempRegion.AddRect(aRect);
iTempRegion2.Intersection(aClippingRegion, iTempRegion);
iTempRegion2.Tidy();
// Assume it is only partially inside region -> Clipped
isClipped = EPartialOverlap;
if (iTempRegion2.Count() == 1)
{
if (iTempRegion2[0] == aRect)
{
// Fully inside region -> Not clipped
isClipped = EFullyInside;
}
}
}
else
{
// No overlap -> aRect is completely outside region -> Clipped
isClipped = EFullyOutside;
}
}
return isClipped;
}