forked from MoonsideGames/MoonWorks
rearrange Color struct
parent
a025e9ad76
commit
0cdc398e43
|
@ -33,20 +33,20 @@ namespace MoonWorks.Graphics
|
|||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the blue component.
|
||||
/// Gets or sets the red component.
|
||||
/// </summary>
|
||||
public byte B
|
||||
public byte R
|
||||
{
|
||||
get
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
return (byte) (this.packedValue >> 16);
|
||||
return (byte)(this.packedValue);
|
||||
}
|
||||
}
|
||||
set
|
||||
{
|
||||
this.packedValue = (this.packedValue & 0xff00ffff) | ((uint) value << 16);
|
||||
this.packedValue = (this.packedValue & 0xffffff00) | value;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -69,20 +69,20 @@ namespace MoonWorks.Graphics
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the red component.
|
||||
/// Gets or sets the blue component.
|
||||
/// </summary>
|
||||
public byte R
|
||||
public byte B
|
||||
{
|
||||
get
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
return (byte) (this.packedValue);
|
||||
return (byte) (this.packedValue >> 16);
|
||||
}
|
||||
}
|
||||
set
|
||||
{
|
||||
this.packedValue = (this.packedValue & 0xffffff00) | value;
|
||||
this.packedValue = (this.packedValue & 0xff00ffff) | ((uint) value << 16);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue