GDI: how use Translation and scale?

using win32 GDI, how can i use Translation and Scale API functions?
Last edited on
for that i must use 'XFORM' structure and SetWorldTransform() function.
how use 'XFORM' structure?
"eDx

The horizontal translation component, in logical units.

eDy

The vertical translation component, in logical units."
so i did:
1
2
3
4
5
6
7
8
9
TRDimention dot = {100,100,20};
    float Perspective = FolcalLenght/(FolcalLenght+dot.PosZ);
    GetWindowSize(HWNDConsoleWindow);
    xForm.eDx = WindowSize.Width/2;
    xForm.eDy = WindowSize.Height/2;
    do{
        SetWorldTransform(HDCConsole,&xForm);
        SetPixel(HDCConsole,dot.PosX,dot.PosY,RGB(255,0,0));
    }while(true);

why the SetPixel() draw it on 100, 100 and not 100+WindowSize.Width/2, 100+WindowSize.Height/2?
PS: i'm using console window HDC.
Last edited on
Topic archived. No new replies allowed.