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

Author Topic: sf::RenderTexture positioning?  (Read 1906 times)

0 Members and 1 Guest are viewing this topic.

aslo

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • Email
sf::RenderTexture positioning?
« on: March 13, 2016, 07:24:50 pm »
Hello guys,
I wanted to ask you if its possible to positioning the sf::RenderTexture the default position is always at 0,0

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: sf::RenderTexture positioning?
« Reply #1 on: March 13, 2016, 07:43:07 pm »
What do you mean? A RenderTexture has no position because it can't be displayed directly. But the sprite that uses it has a position.
Laurent Gomila - SFML developer

aslo

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • Email
Re: sf::RenderTexture positioning?
« Reply #2 on: March 13, 2016, 07:51:35 pm »
I want to make my own Paint and the position of the "drawing surface (RenderTexture) " should be in the middle of the window. Problem solved.
« Last Edit: March 13, 2016, 11:04:51 pm by Laurent »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: sf::RenderTexture positioning?
« Reply #3 on: March 13, 2016, 11:04:36 pm »
Ok, and what prevents you from doing so? Have you written some code yet? Because this is really just basic stuff: to show the content of a texture you use a sprite, and a sprite has a position.
Laurent Gomila - SFML developer