SFML community forums

Help => Graphics => Topic started by: blueeyedlion on July 07, 2011, 01:00:00 am

Title: Am I changing the view correctly?
Post by: blueeyedlion on July 07, 2011, 01:00:00 am
Just to make sure.  If I use this code, each window co-ordinate will be 1 pixel, right?

Code: [Select]
int x = 200;
int y = 300;
myWindow.SetSize (x, y);
myView.SetFromRect (sf::FloatRect (0, 0, x - 1, y - 1));
Title: Am I changing the view correctly?
Post by: blueeyedlion on July 07, 2011, 10:57:06 pm
Come on, somebody must know how this works.
Title: Am I changing the view correctly?
Post by: danman on July 08, 2011, 01:29:14 am
no

sf::FloatRect(left, top width, height);

so 1px => sf::FloatRect(0,0,x,y)
Title: Am I changing the view correctly?
Post by: blueeyedlion on July 08, 2011, 01:45:33 am
Thank you!