Core/Color: Add IsOpaque method
Former-commit-id: b730460b9d81adbcee983648145cbc7a97301329
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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])"
|
||||
|
||||
Reference in New Issue
Block a user