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

Author Topic: Outline inside of Shape::Rectangle  (Read 4376 times)

0 Members and 1 Guest are viewing this topic.

racumin

  • Newbie
  • *
  • Posts: 16
    • View Profile
Outline inside of Shape::Rectangle
« on: November 27, 2009, 08:45:47 am »
Hi, how do I put the border (outline) of a Shape::Rectangle inside the rectangle itself?

Code: [Select]

sf::Shape rect = sf::Shape::Rectangle(0, 0, 50, 50,<color_here>, 2.0f, <color_here>);


In this code, the output was a rectangle with size 50 and its border 2.0f. making the whole rectangle bigger (with size 52). I want to just make the rectangle 50 and its "inner" border 2. Is there any method to do it?

Of course I can just recompute so that the total size is always fixed but I just want to know if this is already implemented. Thanks!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Outline inside of Shape::Rectangle
« Reply #1 on: November 27, 2009, 08:48:57 am »
There's no method other than using a size of 48 instead of 50 ;)
Laurent Gomila - SFML developer

racumin

  • Newbie
  • *
  • Posts: 16
    • View Profile
Outline inside of Shape::Rectangle
« Reply #2 on: November 27, 2009, 09:12:20 am »
Ok thanks