public void Write(C4f value) { base.Write(Conversion.HostToNetworkOrder(value.R)); base.Write(Conversion.HostToNetworkOrder(value.G)); base.Write(Conversion.HostToNetworkOrder(value.B)); base.Write(Conversion.HostToNetworkOrder(value.A)); }
public static System.Drawing.Color ToColor(this C4f color) { return(System.Drawing.Color.FromArgb( Col.ByteFromFloatClamped(color.A), Col.ByteFromFloatClamped(color.R), Col.ByteFromFloatClamped(color.G), Col.ByteFromFloatClamped(color.B))); }
public SamplerStateDescription() { Filter = TextureFilter.MinMagMipPoint; AddressU = WrapMode.Clamp; AddressV = WrapMode.Clamp; AddressW = WrapMode.Clamp; MaxAnisotropy = 16; MinLod = 0.0f; MaxLod = float.MaxValue; MipLodBias = 0.0f; ComparisonFunction = SamplerComparisonFunction.None; BorderColor = C4f.Black; }
public void Write(C4f c) { Write(c.R); Write(c.G); Write(c.B); Write(c.A); }
/// <summary>Computes MD5 hash of given data.</summary> public static Guid ComputeMd5Hash(this C4f x) => ComputeMd5Hash(bw => { bw.Write(x.R); bw.Write(x.G); bw.Write(x.B); bw.Write(x.A); });
/// <summary> /// C4f to System.Drawing.Color. /// </summary> public static Color ToColor(this C4f color) => Color.FromArgb( Col.ByteFromFloatClamped(color.A), Col.ByteFromFloatClamped(color.R), Col.ByteFromFloatClamped(color.G), Col.ByteFromFloatClamped(color.B));