示例#1
0
        public static int ToAndroidColor(this Color color)
        {
            if (AGUtils.IsNotAndroidCheck())
            {
                return(0);
            }

            Color32 c = color;

            return(AndroidColor(c.a, c.r, c.g, c.b));
        }
示例#2
0
        static int AndroidColor(int alpha,
                                int red,
                                int green,
                                int blue)
        {
            if (AGUtils.IsNotAndroidCheck())
            {
                return(0);
            }

            using (var c = new AndroidJavaClass("android.graphics.Color"))
            {
                return(c.CallStaticInt("argb", alpha, red, green, blue));
            }
        }