Core/Color: Add IsOpaque method
Former-commit-id: 4e9dd99525a550af90a1de1a8c86e3120e33a5de
This commit is contained in:
parent
24e23be7ea
commit
9f6a311c07
|
|
@ -25,6 +25,8 @@ namespace Nz
|
||||||
inline Color(const Color& color) = default;
|
inline Color(const Color& color) = default;
|
||||||
inline ~Color() = default;
|
inline ~Color() = default;
|
||||||
|
|
||||||
|
inline bool IsOpaque() const;
|
||||||
|
|
||||||
inline String ToString() const;
|
inline String ToString() const;
|
||||||
|
|
||||||
inline Color operator+(const Color& angles) const;
|
inline Color operator+(const Color& angles) const;
|
||||||
|
|
|
||||||
|
|
@ -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
|
* \brief Converts this to string
|
||||||
* \return String representation of the object "Color(r, g, b[, a])"
|
* \return String representation of the object "Color(r, g, b[, a])"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue