示例#1
0
 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));
 }
示例#2
0
 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)));
 }
示例#3
0
        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);
 }
示例#5
0
 /// <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));