示例#1
0
        private void ProcessClass3(int id, CGMBinaryReader b)
        {
            switch (id)
            {
            case 1:
            {
                int num = b.ReadI();
                b.context.VDCIntegerPrecision = num;
                break;
            }

            case 2:
            {
                int num2 = b.ReadE();
                int num3 = b.ReadI();
                int num4 = b.ReadI();
                if (num2 != 0)
                {
                    if (num4 >= 0x20)
                    {
                        b.context.VDCRealType = CGMBinaryContext.RealTypeEnum.Fixed64;
                    }
                    else
                    {
                        b.context.VDCRealType = CGMBinaryContext.RealTypeEnum.Fixed32;
                    }
                    break;
                }
                if (num4 < 0x20)
                {
                    b.context.VDCRealType = CGMBinaryContext.RealTypeEnum.Float32;
                    break;
                }
                b.context.VDCRealType = CGMBinaryContext.RealTypeEnum.Float64;
                break;
            }
            }
        }
示例#2
0
        private void ProcessClass1(int id, CGMBinaryReader b)
        {
            switch (id)
            {
            case 3:
                if (b.ReadE() != 0)
                {
                    b.context.isRealVDC = true;
                    break;
                }
                b.context.isRealVDC = false;
                break;

            case 4:
            {
                int num2 = b.ReadI();
                b.context.IntegerPrecision = num2;
                break;
            }

            case 5:
            {
                int num3 = b.ReadE();
                int num4 = b.ReadI();
                int num5 = b.ReadI();
                if (num3 != 0)
                {
                    if (num5 >= 0x20)
                    {
                        b.context.RealType = CGMBinaryContext.RealTypeEnum.Fixed64;
                    }
                    else
                    {
                        b.context.RealType = CGMBinaryContext.RealTypeEnum.Fixed32;
                    }
                    break;
                }
                if (num5 < 0x20)
                {
                    b.context.RealType = CGMBinaryContext.RealTypeEnum.Float32;
                    break;
                }
                b.context.RealType = CGMBinaryContext.RealTypeEnum.Float64;
                break;
            }

            case 6:
            {
                int num6 = b.ReadI();
                b.context.IndexPrecision = num6;
                break;
            }

            case 7:
            {
                int num7 = b.ReadI();
                b.context.ColorPrecision = num7;
                break;
            }

            case 8:
            {
                int num8 = b.ReadI();
                b.context.ColorIndexPrecision = num8;
                break;
            }

            case 14:
            {
                int num9 = b.ReadE();
                b.context.CharSetType = num9;
                break;
            }

            case 0x13:
                b.context.ColorModel = (CGMBinaryContext.ColorModelEnum)Enum.ToObject(typeof(CGMBinaryContext.ColorModelEnum), b.ReadIX());//TODO: to metod
                break;
            }
        }