public static void Write(this BinaryWriter writer, ColorArgb color) { // Write a ColorArgb object to the stream. writer.Write(color.a); writer.Write(color.r); writer.Write(color.g); writer.Write(color.b); }
public static ColorArgb ReadColorArgb(this BinaryReader reader) { // Read a ColorArgb object from the stream. ColorArgb color = new ColorArgb(); color.a = reader.ReadByte(); color.r = reader.ReadByte(); color.g = reader.ReadByte(); color.b = reader.ReadByte(); return(color); }