Hello everybody,
I am very thankful for this great resource!
I have a question about using the RotateTransform command in GDI. I am trying to rotate a line around the centre of the screen, like an artificial horizon, but instead of rotating left and right like you would want, the whole thing rotates around the screen in a large arc. The line does actually follow the horizon, so it's not wholly wrong, but it's following it like it's going around the outside a clock instead of staying fixed in the middle. I hope that makes some sense?
Any help with where I am going wrong?
Gracias
I am very thankful for this great resource!
I have a question about using the RotateTransform command in GDI. I am trying to rotate a line around the centre of the screen, like an artificial horizon, but instead of rotating left and right like you would want, the whole thing rotates around the screen in a large arc. The line does actually follow the horizon, so it's not wholly wrong, but it's following it like it's going around the outside a clock instead of staying fixed in the middle. I hope that makes some sense?
Any help with where I am going wrong?
Code:
x1=0.0 * dx;
x2=256.0 * dx;
y1=256.0 * dy;
y2=256.0 * dy;
SimConnectData->bankDegrees = (double)((double)SimConnectData->NavData->bank * (double)(-180.0 / M_PI));
mGraphics->TranslateTransform(x2,y2);
mGraphics->RotateTransform( (REAL)(SimConnectData->bankDegrees)* -1 );
PointF c14(x1 , y1) ;PointF d24(x2 , y2) ;PointF l4[2] = {c14,d24}; PointF* lnPoints4 = l4;
mGraphics->DrawLines(mBluePen,l4,2);
mGraphics->ResetTransform();
Gracias

