Esempio n. 1
0
        internal override void Read(Class434 or, Class259 ob)
        {
            base.Read(or, ob);
            Interface30 objectBitStream = or.ObjectBitStream;

            this.AttachmentPoint = (AttachmentPoint)objectBitStream.imethod_11();
            this.XDirection      = objectBitStream.imethod_51();
            this.Location        = objectBitStream.imethod_39();
            this.size2D_0.X      = objectBitStream.imethod_8();
            this.size2D_0.Y      = objectBitStream.imethod_8();
            this.size2D_1.X      = objectBitStream.imethod_8();
            this.size2D_1.Y      = objectBitStream.imethod_8();
            DxfMTextObjectContextData.ColumnType columnType = (DxfMTextObjectContextData.ColumnType)objectBitStream.imethod_11();
            if (columnType == DxfMTextObjectContextData.ColumnType.NoColumns)
            {
                this.Columns = (DxfMTextObjectContextData.ColumnsData)null;
            }
            else
            {
                this.Columns = new DxfMTextObjectContextData.ColumnsData()
                {
                    Type           = columnType,
                    ColumnsCount   = objectBitStream.imethod_11(),
                    ColumnWidth    = objectBitStream.imethod_8(),
                    Gutter         = objectBitStream.imethod_8(),
                    IsAutoHeight   = objectBitStream.imethod_6(),
                    IsFlowReversed = objectBitStream.imethod_6()
                };
                if (this.Columns.IsAutoHeight || this.Columns.Type != DxfMTextObjectContextData.ColumnType.DynamicColumns || this.Columns.ColumnsCount == 0)
                {
                    return;
                }
                this.Columns.ColumnHeights = new List <double>();
                for (int index = 0; index < this.Columns.ColumnsCount; ++index)
                {
                    this.Columns.ColumnHeights.Add(objectBitStream.imethod_8());
                }
            }
        }
Esempio n. 2
0
        internal override void Read(DxfReader r, Class259 objectBuilder)
        {
            base.Read(r, objectBuilder);
            while (!r.method_92("AcDbMTextObjectContextData"))
            {
                switch (r.CurrentGroup.Code)
                {
                case 10:
                    this.vector3D_0.X = (double)r.CurrentGroup.Value;
                    break;

                case 11:
                    this.point3D_0.X = (double)r.CurrentGroup.Value;
                    break;

                case 20:
                    this.vector3D_0.Y = (double)r.CurrentGroup.Value;
                    break;

                case 21:
                    this.point3D_0.Y = (double)r.CurrentGroup.Value;
                    break;

                case 30:
                    this.vector3D_0.Z = (double)r.CurrentGroup.Value;
                    break;

                case 31:
                    this.point3D_0.Z = (double)r.CurrentGroup.Value;
                    break;

                case 40:
                    this.size2D_0.X = (double)r.CurrentGroup.Value;
                    break;

                case 41:
                    this.size2D_0.Y = (double)r.CurrentGroup.Value;
                    break;

                case 42:
                    this.size2D_1.X = (double)r.CurrentGroup.Value;
                    break;

                case 43:
                    this.size2D_1.Y = (double)r.CurrentGroup.Value;
                    break;

                case 44:
                    if (this.Columns == null)
                    {
                        this.Columns = new DxfMTextObjectContextData.ColumnsData();
                    }
                    this.Columns.ColumnWidth = (double)r.CurrentGroup.Value;
                    break;

                case 45:
                    if (this.Columns == null)
                    {
                        this.Columns = new DxfMTextObjectContextData.ColumnsData();
                    }
                    this.Columns.Gutter = (double)r.CurrentGroup.Value;
                    break;

                case 46:
                    if (this.Columns == null)
                    {
                        this.Columns = new DxfMTextObjectContextData.ColumnsData();
                    }
                    if (this.Columns.ColumnHeights == null)
                    {
                        this.Columns.ColumnHeights = new List <double>();
                    }
                    this.Columns.ColumnHeights.Add((double)r.CurrentGroup.Value);
                    break;

                case 70:
                    this.AttachmentPoint = (AttachmentPoint)r.CurrentGroup.Value;
                    break;

                case 71:
                    DxfMTextObjectContextData.ColumnType columnType = (DxfMTextObjectContextData.ColumnType)(short) r.CurrentGroup.Value;
                    if (this.Columns == null && columnType != DxfMTextObjectContextData.ColumnType.NoColumns)
                    {
                        this.Columns = new DxfMTextObjectContextData.ColumnsData()
                        {
                            Type = columnType
                        };
                        break;
                    }
                    if (this.Columns != null)
                    {
                        this.Columns.Type = columnType;
                        break;
                    }
                    break;

                case 72:
                    if (this.Columns == null)
                    {
                        this.Columns = new DxfMTextObjectContextData.ColumnsData();
                    }
                    this.Columns.ColumnsCount = (int)(short)r.CurrentGroup.Value;
                    break;

                case 73:
                    if (this.Columns == null)
                    {
                        this.Columns = new DxfMTextObjectContextData.ColumnsData();
                    }
                    this.Columns.IsAutoHeight = (short)r.CurrentGroup.Value == (short)1;
                    break;

                case 74:
                    if (this.Columns == null)
                    {
                        this.Columns = new DxfMTextObjectContextData.ColumnsData();
                    }
                    this.Columns.IsFlowReversed = (short)r.CurrentGroup.Value == (short)1;
                    break;

                default:
                    throw new DxfException("Unexpected group code.");
                }
                r.method_85();
            }
            if (this.Columns == null || this.Columns.Type == DxfMTextObjectContextData.ColumnType.NoColumns || (this.Columns.IsAutoHeight || this.Columns.ColumnsCount == 0))
            {
                return;
            }
            if (this.Columns.ColumnHeights == null)
            {
                this.Columns.ColumnHeights = new List <double>();
            }
            while (this.Columns.ColumnHeights.Count < this.Columns.ColumnsCount)
            {
                this.Columns.ColumnHeights.Add(this.size2D_0.Y);
            }
        }