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

Author Topic: Shape setposition  (Read 1167 times)

0 Members and 1 Guest are viewing this topic.

takercena

  • Newbie
  • *
  • Posts: 10
    • View Profile
Shape setposition
« on: June 08, 2012, 06:23:52 am »
I read somewhere in this forum that setposition is returning an absolute coordinate. Is there any way to make it so when I set a circle origin (setPosition) at 0,0, only the last quarter of the circle is viewed on the window?
« Last Edit: June 08, 2012, 06:30:04 am by takercena »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Shape setposition
« Reply #1 on: June 08, 2012, 08:08:05 am »
You can set the origin of the circle to be its center instead of its top-left corner

circle.setOrigin(radius / 2, radius / 2);
Laurent Gomila - SFML developer

takercena

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Shape setposition
« Reply #2 on: June 14, 2012, 05:02:56 am »
Thank you.

 

anything