IntersectRect function

Reference: http://msdn.microsoft.com/en-us/library/dd145001(v=VS.85).aspx

 

IntersectRect function

            This topic has not yet been rated- Rate this topic

Applies to: desktop apps only

The IntersectRect function calculates the intersection of two source rectangles and places the coordinates of the intersection rectangle into the destination rectangle. If the source rectangles do not intersect, an empty rectangle (in which all coordinates are set to zero) is placed into the destination rectangle.

Syntax

BOOL IntersectRect(
  __out  LPRECT lprcDst,
  __in   const RECT *lprcSrc1,
  __in   const RECT *lprcSrc2
);

Parameters

lprcDst [out]

A pointer to the RECT structure that is to receive the intersection of the rectangles pointed to by thelprcSrc1 and lprcSrc2 parameters. This parameter cannot be NULL.

lprcSrc1 [in]

A pointer to the RECT structure that contains the first source rectangle.

lprcSrc2 [in]

A pointer to the RECT structure that contains the second source rectangle.

Return value

If the rectangles intersect, the return value is nonzero.

If the rectangles do not intersect, the return value is zero.

Remarks

Because applications can use rectangles for different purposes, the rectangle functions do not use an explicit unit of measure. Instead, all rectangle coordinates and dimensions are given in signed, logical values. The mapping mode and the function in which the rectangle is used determine the units of measure.

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值