[WINAPI] Regarding GDI Mapping

This is a snippet of an example in my book. What I don't understand in this code is that the SetWindowOrgEx x value increases positively to the left, why is this? Tehinically this should be like MM_TEXT in which the x value increases going to the right. I notice as well that the x value does increase to the right with SetViewportOrgEx. Why does the x value increase to the right with SetViewportOrgEx but SetWindowOrgEx's x value increases to the left? Also, what's the point of changing both extents? Couldn't you just edit one of the extents?

1
2
3
4
5
6
SetMapMode(hdc, MM_ISOTROPIC);
SetWindowExtEx(hdc, 276, 72, NULL);
SetViewportExtEx(hdc, cxClient, cyClient, NULL);

SetWindowOrgEx(hdc, 138, 36, NULL);
SetViewportOrgEx(hdc, cxClient / 2, cyClient / 2, NULL);
bump
Topic archived. No new replies allowed.