mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 00:37:15 +01:00
Implemented user defined type conversion for color types.
This commit is contained in:
parent
6f89d0b8d1
commit
c6ee38e3b6
@ -460,6 +460,12 @@ bool Color3::operator >= (const Color3 & c) const
|
||||
return (r >= c.r) && (g >= c.g) && (b >= c.b);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
Color3::operator Color4 () const
|
||||
{
|
||||
return Color4(r, g, b);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
SQInteger Color3::Cmp(const Color3 & c) const
|
||||
{
|
||||
|
@ -369,6 +369,11 @@ struct Color3
|
||||
*/
|
||||
bool operator >= (const Color3 & c) const;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
operator Color4 () const;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
|
@ -493,6 +493,12 @@ bool Color4::operator >= (const Color4 & c) const
|
||||
return (r >= c.r) && (g >= c.g) && (b >= c.b) && (a >= c.a);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
Color4::operator Color3 () const
|
||||
{
|
||||
return Color3(r, g, b);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
SQInteger Color4::Cmp(const Color4 & c) const
|
||||
{
|
||||
|
@ -374,6 +374,11 @@ struct Color4
|
||||
*/
|
||||
bool operator >= (const Color4 & c) const;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
operator Color3 () const;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user