Core/Color: Add IsOpaque method

Former-commit-id: 4e9dd99525a550af90a1de1a8c86e3120e33a5de
This commit is contained in:
Lynix 2016-05-13 12:47:53 +02:00
parent 24e23be7ea
commit 9f6a311c07
2 changed files with 11 additions and 0 deletions

View File

@ -25,6 +25,8 @@ namespace Nz
inline Color(const Color& color) = default;
inline ~Color() = default;
inline bool IsOpaque() const;
inline String ToString() const;
inline Color operator+(const Color& angles) const;

View File

@ -72,6 +72,15 @@ namespace Nz
{
}
/*!
* \brief Return true is the color has no degree of transparency
* \return true if the color has an alpha value of 255
*/
inline bool Color::IsOpaque() const
{
return a == 255;
}
/*!
* \brief Converts this to string
* \return String representation of the object "Color(r, g, b[, a])"