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

Author Topic: Are there any function that could change the coordinates system of window ?  (Read 2500 times)

0 Members and 1 Guest are viewing this topic.

lyvinhloi.cntt

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Email
Oh .. uhm ...
I want to change the coordinates system of window from the top-left to the bottom-left to easy to draw my sprites.

Ixrec

  • Hero Member
  • *****
  • Posts: 1241
    • View Profile
    • Email
No, although you could use the setOrigin() function on every single one of your Transformables to get the same effect.  Having the origin in the top-left corner is a common convention in computer graphics, so it's best to just get used to it.
« Last Edit: June 07, 2014, 07:30:41 pm by Ixrec »

lyvinhloi.cntt

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Email
Thanks for the answer  :-\ ..

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Try setting your sf::View y size to a negative value, the effect is.. interesting (looks like it's working, but I never used that myself or felt the need for it), maybe you can work with that.
Back to C++ gamedev with SFML in May 2023

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Inverting the view inverts... everything. Sprites, texts and everything are upside down.

Right now there's no easy way to invert the Y axis in SFML.
Laurent Gomila - SFML developer

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Except for Text it's the desired effect it seems. :P
Wrapping RenderTarget and transforming everything before draw is a way too I guess.
Or just sticking to default for many guis and engines... :P ('inverted' y)
Back to C++ gamedev with SFML in May 2023