Added a new constructor that takes single Uint32 to Color
This commit is contained in:
parent
8dd31f2f52
commit
88ec48cb85
2 changed files with 19 additions and 0 deletions
|
@ -67,6 +67,17 @@ a(alpha)
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
Color::Color(Uint32 color) :
|
||||
r((color & 0xff000000) >> 24),
|
||||
g((color & 0x00ff0000) >> 16),
|
||||
b((color & 0x0000ff00) >> 8 ),
|
||||
a((color & 0x000000ff) >> 0 )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
bool operator ==(const Color& left, const Color& right)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue