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

Author Topic: SFML Color extension  (Read 2711 times)

0 Members and 1 Guest are viewing this topic.

EddyKuo

  • Newbie
  • *
  • Posts: 1
    • View Profile
SFML Color extension
« on: June 29, 2019, 06:07:48 pm »
Since I found this library, I feel very easy to use. I often use this library to implement some small programs. This also makes me use C# for a long time, and return to the embrace of C++ again. When I use color, I found that the definition of Color class inside is not very much. So I wrote an extension about the Color class.

If you are also looking for something like a .net Color table. Then I think this is what you want

https://github.com/EddyKuo/SFMLColorExtension

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: SFML Color extension
« Reply #1 on: July 03, 2019, 09:48:14 pm »
Since I found this library, I feel very easy to use. I often use this library to implement some small programs.
It's not a shame to declare yourself as the author of the library ;)

class ColorEx : public sf::Color { .. }
Your class has no member variables and member functions, but acts as a pure namespace. Neither inheritance nor a class is needed, namespace is what you are looking for.

Also, I would not use the namespace sf for extensions to SFML.
Nevertheless, this can be a useful collection of colors! :)
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Sub

  • Full Member
  • ***
  • Posts: 157
    • View Profile
Re: SFML Color extension
« Reply #2 on: July 06, 2019, 03:04:17 am »
More colors are of course nice.  I think what a truly useful color extension library truly needs though is multiple color spaces that you can easily convert between. 

 

anything