谁能帮我解释一下Petzold这些话的意思:
SetViewportOrgEx (hdc, cxClient / 2, cyClient / 2, NULL) ;
SetWindowOrgEx (hdc, -cxClient / 2, -cyClient / 2, NULL) ;
This means that the logical point (-cxClient/2, -cyClient/2) is mapped to the device point (cxClient/2, cyClient/2), ......
我对这段话极不理解!
他在前面说:
You can achieve the same result with SetWindowOrgEx as you did when you used SetViewportOrgEx:
SetWindowOrgEx (hdc, -cxClient / 2, -cyClient / 2, NULL)
说明这两句话的作用是一样的,并且他很明确地说视口原点是不变的。
为何作用会有“叠加”的效果?
以窗口宽高1,1,MM_TEXT为例,为何窗口原点是(1,1)而不是(0.5,0.5)?