MakeArgb() private static method

private static MakeArgb ( byte alpha, byte red, byte green, byte blue ) : long
alpha byte
red byte
green byte
blue byte
return long
コード例 #1
0
ファイル: Color.cs プロジェクト: davemclaughlin/TinyCLR.Glide
 public static Color FromArgb(int alpha, Color baseColor)
 {
     if (alpha < 0 || alpha > (int)byte.MaxValue)
     {
         throw new ArgumentOutOfRangeException(nameof(alpha));
     }
     return(new Color(Color.MakeArgb((byte)alpha, baseColor.R, baseColor.G, baseColor.B)));
 }
コード例 #2
0
ファイル: Color.cs プロジェクト: davemclaughlin/TinyCLR.Glide
 public static Color FromArgb(int alpha, int red, int green, int blue)
 {
     if (alpha < 0 || alpha > (int)byte.MaxValue)
     {
         throw new ArgumentOutOfRangeException(nameof(alpha));
     }
     if (red < 0 || red > (int)byte.MaxValue)
     {
         throw new ArgumentOutOfRangeException(nameof(red));
     }
     if (green < 0 || green > (int)byte.MaxValue)
     {
         throw new ArgumentOutOfRangeException(nameof(green));
     }
     if (blue < 0 || blue > (int)byte.MaxValue)
     {
         throw new ArgumentOutOfRangeException(nameof(blue));
     }
     return(new Color(Color.MakeArgb((byte)alpha, (byte)red, (byte)green, (byte)blue)));
 }