Sets the viewport origin of the device context. The viewport, along with the device-context window, defines how GDI maps points in the logical coordinate system to points in the coordinate system of the actual device. In other words, they define how GDI converts logical coordinates into device coordinates. The viewport origin s the point in the device coordinate system to which GDI maps the window origin, a point in the logical coordinate system specified by the SetWindowOrg member function. GDI maps all other points by following the same process required to map the window origin to the viewport origin. For example, all points in a circle around the point at the window origin will be in a circle around the point at the viewport origin. Similarly, all points in a line that passes through the window origin will be in a line that passes through the viewport origin.我先摆上英文,稍等
SetViewportOrg 设置视口原点
// pDC->SetViewportOrg(100,100);
pDC->SetWindowOrg(100,100);
这样的话会把当前的原点(左上角点)设置为(0,0) pDC->SetMapMode(MM_HIENGLISH);
pDC->SetViewportOrg(100,100);
// pDC->SetWindowOrg(100,100);这样的话会把当前的100,100点(像素点)变成坐标原点
碰到这些问题,我都是临时翻书me too
:-)
// pDC->SetViewportOrg(100,100);
pDC->SetWindowOrg(100,100);
这样的话会把当前的原点(左上角点)设置为(100,100) pDC->SetMapMode(MM_HIENGLISH);
pDC->SetViewportOrg(100,100);
// pDC->SetWindowOrg(100,100);这样的话会把当前的100,100点(像素点)变成坐标原点