public static MsgPack WriteMP(this RGBAKey RGBA, string name) { if (RGBA.R == null && RGBA.G == null && RGBA.B == null && RGBA.A == null) { return(MsgPack.Null); } return(new MsgPack(name).Add(RGBA.R.WriteMP("R")).Add(RGBA.G.WriteMP("G")) .Add(RGBA.B.WriteMP("B")).Add(RGBA.A.WriteMP("A"))); }
public static void Write(this Stream IO, RGBAKey RGBA, string Temp, string Data, bool A3DC = false) { if (RGBA.R == null && RGBA.B == null && RGBA.G == null && RGBA.A == null) { return; } IO.Write(Temp + Data + "=", "true"); IO.Write(RGBA.A, Temp + Data + d + "a" + d, A3DC); IO.Write(RGBA.B, Temp + Data + d + "b" + d, A3DC); IO.Write(RGBA.G, Temp + Data + d + "g" + d, A3DC); IO.Write(RGBA.R, Temp + Data + d + "r" + d, A3DC); }
public static void ReadRGBAKey(this Stream IO, ref RGBAKey RGBA, int C_F16) { IO.ReadKey(ref RGBA.R, C_F16); IO.ReadKey(ref RGBA.G, C_F16); IO.ReadKey(ref RGBA.B, C_F16); IO.ReadKey(ref RGBA.A, C_F16); }