public void ConstructionFromBytesSetsColor1() { var color = new Color565Helper(40500); var bytes = new byte[BlockFormat.BC2ByteSize]; bytes[10] = color.LowByte; bytes[11] = color.HighByte; var block = BC2BlockData.FromBytes(bytes); Assert.AreEqual(color.Color.Value, block.Color1.Value); }
public void ConversionToBytesSetsColor1() { var color = new Color565Helper(40500); var block = new BC2BlockData(); block.Color1 = color.Color; var buffer = block.ToBytes(); byte c1Low = buffer[10]; byte c1High = buffer[11]; Assert.AreEqual(color.LowByte, c1Low); Assert.AreEqual(color.HighByte, c1High); }
public void ConversionToBytesSetsColor0() { var color = new Color565Helper(40500); var block = new BC1BlockData(); block.Color0 = color.Color; var buffer = block.ToBytes(); byte c0Low = buffer[0]; byte c0Hi = buffer[1]; Assert.AreEqual(color.LowByte, c0Low); Assert.AreEqual(color.HighByte, c0Hi); }