关于CDC::Rectangle参数设定时一个不得解的问题
MSDN上说:
BOOL Rectangle(int x1,int y1,int x2,int y2);
x1——Specifies the x-coordinate of the upper-left corner of the rectangle (in logical units).
y1——Specifies the y-coordinate of the upper-left corner of the rectangle (in logical units).
x2——Specifies the x-coordinate of the lower-right corner of the rectangle (in logical units).
y2——Specifies the y-coordinate of the lower-right corner of the rectangle (in logical units).
那么画一个100*100的举行在MM_TEXT模式下正常应该是:
pDC->Rectangle(int x1=0,int y1=0,int x2=100,int y2=100);
但我用:
pDC->Rectangle(int x1=100,int y1=100,int x2=0,int y2=0);
还有
pDC->Rectangle(int x1=0,int y1=100,int x2=100,int y2=0);
都能画同样的矩形。不是说应该指定左上和右下角的横纵坐标吗?为什么用右下+左上 和 左下+右上 也可以呢?