SFML community forums

Help => Graphics => Topic started by: racumin on November 27, 2009, 08:45:47 am

Title: Outline inside of Shape::Rectangle
Post by: racumin 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!
Title: Outline inside of Shape::Rectangle
Post by: Laurent on November 27, 2009, 08:48:57 am
There's no method other than using a size of 48 instead of 50 ;)
Title: Outline inside of Shape::Rectangle
Post by: racumin on November 27, 2009, 09:12:20 am
Ok thanks