Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Am I changing the view correctly?  (Read 2163 times)

0 Members and 1 Guest are viewing this topic.

blueeyedlion

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
Am I changing the view correctly?
« 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));

blueeyedlion

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
Am I changing the view correctly?
« Reply #1 on: July 07, 2011, 10:57:06 pm »
Come on, somebody must know how this works.

danman

  • Hero Member
  • *****
  • Posts: 1121
    • View Profile
    • Email
Am I changing the view correctly?
« Reply #2 on: July 08, 2011, 01:29:14 am »
no

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

so 1px => sf::FloatRect(0,0,x,y)
Pointilleur professionnel

blueeyedlion

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
Am I changing the view correctly?
« Reply #3 on: July 08, 2011, 01:45:33 am »
Thank you!