PixelMagic.DestRegister.MakeMask C# (CSharp) Method

MakeMask() public static method

public static MakeMask ( bool r, bool g, bool b, bool a ) : int
r bool
g bool
b bool
a bool
return int
        public static int MakeMask(bool r, bool g, bool b, bool a)
        {
            int res = 0;
            if (r)
                res |= 0x1;
            if (g)
                res |= 0x2;
            if (b)
                res |= 0x4;
            if (a)
                res |= 0x8;
            return res;
        }