SFML community forums

General => Feature requests => Topic started by: Yuraj on May 01, 2013, 09:36:09 pm

Title: Rounded Rectangle
Post by: Yuraj on May 01, 2013, 09:36:09 pm
Hi,
Why there is not a RoundedRectangle shape in SFML ?  :)
Title: Re: Rounded Rectangle
Post by: Laurent on May 01, 2013, 10:46:35 pm
Why would there be one?
Title: Re: Rounded Rectangle
Post by: santiaboy on May 01, 2013, 11:03:16 pm
You can create your own roundedRectangle class!

It's just a sf::RectangleShape and 4 sf::CircleShape, taped together with duct tape
Title: Re: Rounded Rectangle
Post by: Laurent on May 01, 2013, 11:12:46 pm
I think someone already did it, and shared it either on the forum or the wiki.
Title: Re: Rounded Rectangle
Post by: Nexus on May 01, 2013, 11:17:25 pm
thor::roundedRect() (http://www.bromeon.ch/libraries/thor/v2.0/doc/namespacethor_1_1_shapes.html) -- a function, not a class.
Title: Re: Rounded Rectangle
Post by: Yuraj on May 02, 2013, 01:16:39 am
Why would there be one?
Because I think it's common shape? I know, you can do it on your own (not so hard), but why we need to discover wheel every time? I think it could be useful (mainly for newbies).