System.Drawing.Color.MakeArgb C# (CSharp) Method

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
        private static long MakeArgb(byte alpha, byte red, byte green, byte blue) =>
            (long)unchecked((uint)(red << ARGBRedShift |
                green << ARGBGreenShift |
                blue << ARGBBlueShift |
                alpha << ARGBAlphaShift)) & 0xffffffff;

Usage Example

Beispiel #1
0
 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)));
 }
All Usage Examples Of System.Drawing.Color::MakeArgb