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

Author Topic: Rounded Rectangle  (Read 6117 times)

0 Members and 1 Guest are viewing this topic.

Yuraj

  • Newbie
  • *
  • Posts: 8
  • C#
    • View Profile
    • Email
Rounded Rectangle
« on: May 01, 2013, 09:36:09 pm »
Hi,
Why there is not a RoundedRectangle shape in SFML ?  :)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Rounded Rectangle
« Reply #1 on: May 01, 2013, 10:46:35 pm »
Why would there be one?
Laurent Gomila - SFML developer

santiaboy

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: Rounded Rectangle
« Reply #2 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

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Rounded Rectangle
« Reply #3 on: May 01, 2013, 11:12:46 pm »
I think someone already did it, and shared it either on the forum or the wiki.
Laurent Gomila - SFML developer

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Rounded Rectangle
« Reply #4 on: May 01, 2013, 11:17:25 pm »
thor::roundedRect() -- a function, not a class.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Yuraj

  • Newbie
  • *
  • Posts: 8
  • C#
    • View Profile
    • Email
Re: Rounded Rectangle
« Reply #5 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).

 

anything