Scale?

Started by
2 comments, last by Dial-Up 21 years ago
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...
Advertisement
Allegro has a blit_stretch function. Would that help you?
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
<<<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>>>>Ilthigore<<<<<<<<<<<<<<<<<

This topic is closed to new replies.

Advertisement