Scale?
I''m going from Visual Basic to C++, and I was wondering if there was anyway to redefine the coordinates of the screen.
In VB, it would go:
Form1.Scale(x1,y1)-(x2,y2)
Where (x1,y1) is the upper-left corner and (x2,y2) is the lower-right corner.
I''m working in DOS, using Allegro with DJGPP, if it matters at all...
That isn''t what I''m talking about... Normally, when you type in coordinates for something, it would be in pixels. What I want to do is to be able to redefine that so that (0,0) is in the centre of the screen.
Just make a point function:
const int left = -400;
const int top = -300;
POINT ScreenPoint(int x, int y)
{
POINT ret;
ret.x = x-left;
ret.y = y-top;
return ret;
}
>>>>>>>>>>>>>>>>>
Ilthigore
<<<<<<<<<<<<<<<<<
const int left = -400;
const int top = -300;
POINT ScreenPoint(int x, int y)
{
POINT ret;
ret.x = x-left;
ret.y = y-top;
return ret;
}
>>>>>>>>>>>>>>>>>
Ilthigore
<<<<<<<<<<<<<<<<<
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement