首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

怎样判断两个CRgn是否重叠?该怎么处理

2012-01-22 
怎样判断两个CRgn是否重叠?如题谢谢[解决办法]CRgn::EqualRgn[解决办法]CRgn::CombineRgn[解决办法]Combin

怎样判断两个CRgn是否重叠?
如题
谢谢

[解决办法]
CRgn::EqualRgn
[解决办法]
CRgn::CombineRgn
[解决办法]
CombineRgn

CRgn::CombineRgn
int CombineRgn( CRgn* pRgn1, CRgn* pRgn2, int nCombineMode );

Return Value

Specifies the type of the resulting region. It can be one of the following values:

COMPLEXREGION New region has overlapping borders.


ERROR No new region created.


NULLREGION New region is empty.


SIMPLEREGION New region has no overlapping borders.
Parameters

pRgn1

Identifies an existing region.

pRgn2

Identifies an existing region.

nCombineMode

Specifies the operation to be performed when combining the two source regions. It can be any one of the following values:

RGN_AND Uses overlapping areas of both regions (intersection).


RGN_COPY Creates a copy of region 1 (identified by pRgn1).


RGN_DIFF Creates a region consisting of the areas of region 1 (identified by pRgn1) that are not part of region 2 (identified by pRgn2).


RGN_OR Combines both regions in their entirety (union).


RGN_XOR Combines both regions but removes overlapping areas.
Remarks

Creates a new GDI region by combining two existing regions. The regions are combined as specified by nCombineMode.

The two specified regions are combined, and the resulting region handle is stored in the CRgn object. Thus, whatever region is stored in the CRgn object is replaced by the combined region.

The size of a region is limited to 32,767 by 32,767 logical units or 64K of memory, whichever is smaller.

Use CopyRgn to simply copy one region into another region.

CRgn Overview | Class Members | Hierarchy Chart

See Also CRgn::CopyRgn,::CombineRgn

热点排行