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 #region Public Properties
/// <summary> /// <summary>
/// Gets or sets the blue component. /// Gets or sets the red component.
/// </summary> /// </summary>
public byte B public byte R
{ {
get get
{ {
unchecked unchecked
{ {
return (byte) (this.packedValue >> 16); return (byte)(this.packedValue);
} }
} }
set set
{ {
this.packedValue = (this.packedValue & 0xff00ffff) | ((uint) value << 16); this.packedValue = (this.packedValue & 0xffffff00) | value;
} }
} }
@ -69,20 +69,20 @@ namespace MoonWorks.Graphics
} }
/// <summary> /// <summary>
/// Gets or sets the red component. /// Gets or sets the blue component.
/// </summary> /// </summary>
public byte R public byte B
{ {
get get
{ {
unchecked unchecked
{ {
return (byte) (this.packedValue); return (byte) (this.packedValue >> 16);
} }
} }
set set
{ {
this.packedValue = (this.packedValue & 0xffffff00) | value; this.packedValue = (this.packedValue & 0xff00ffff) | ((uint) value << 16);
} }
} }