iTextSharp.text.pdf.PdfShading.CheckCompatibleColors C# (CSharp) Метод

CheckCompatibleColors() публичный статический Метод

public static CheckCompatibleColors ( BaseColor c1, BaseColor c2 ) : void
c1 iTextSharp.text.BaseColor
c2 iTextSharp.text.BaseColor
Результат void
        public static void CheckCompatibleColors(BaseColor c1, BaseColor c2)
        {
            int type1 = ExtendedColor.GetType(c1);
            int type2 = ExtendedColor.GetType(c2);
            if (type1 != type2)
                throw new ArgumentException(MessageLocalization.GetComposedMessage("both.colors.must.be.of.the.same.type"));
            if (type1 == ExtendedColor.TYPE_SEPARATION && ((SpotColor)c1).PdfSpotColor != ((SpotColor)c2).PdfSpotColor)
                throw new ArgumentException(MessageLocalization.GetComposedMessage("the.spot.color.must.be.the.same.only.the.tint.can.vary"));
            if (type1 == ExtendedColor.TYPE_PATTERN || type1 == ExtendedColor.TYPE_SHADING)
                ThrowColorSpaceError();
        }