rearrange Color struct

pull/14/head
cosmonaut 2021-01-20 16:09:29 -08:00
parent a025e9ad76
commit 0cdc398e43
1 changed files with 36 additions and 36 deletions

View File

@ -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);
}
}