本文介绍了CRgn类的行为的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
Hi All,
CPoint ptArray[5];
ptArray[0] = CPoint(657, 79);
ptArray[1] = CPoint(675, 71);
ptArray[2] = CPoint(694, 66);
ptArray[3] = CPoint(912, 64);
ptArray[4] = CPoint(792, 66);
CRgn rgnObject;
rgnObject.CreatePolygonRgn(ptArray, 5, ALTERNATE);
CRect rectBounding;
rgnObject.GetRgnBox(rectBounding);
对于边界rect,我期望left = 657,right = 912,top = 64 and bottom 79,即最小和最大X和Y坐标.
实际结果为左= 660,右= 852,顶部= 65,底部79
谁能解释一下?
在此先感谢.
For bounding rect, I was expecting left = 657, right = 912, top = 64 and bottom 79 i.e. minimum and maximum X and Y coordinates.
Actual results are left = 660, right = 852, top = 65 and bottom 79
Can anyone explain this?
Thanks in advance.
推荐答案
这篇关于CRgn类的行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!