コード例 #1
0
ファイル: DxfMText.cs プロジェクト: 15831944/WW
        public override void CopyFrom(DxfHandledObject from, CloneContext cloneContext)
        {
            base.CopyFrom(from, cloneContext);
            DxfMText dxfMtext = (DxfMText)from;

            this.string_1              = dxfMtext.string_1;
            this.Style                 = Class906.GetTextStyle(cloneContext, dxfMtext.Style);
            this.point3D_0             = dxfMtext.point3D_0;
            this.double_1              = dxfMtext.double_1;
            this.double_2              = dxfMtext.double_2;
            this.double_3              = dxfMtext.double_3;
            this.attachmentPoint_0     = dxfMtext.attachmentPoint_0;
            this.drawingDirection_0    = dxfMtext.drawingDirection_0;
            this.vector3D_0            = dxfMtext.vector3D_0;
            this.vector3D_1            = dxfMtext.vector3D_1;
            this.lineSpacingStyle_0    = dxfMtext.lineSpacingStyle_0;
            this.double_4              = dxfMtext.double_4;
            this.backgroundFillFlags_0 = dxfMtext.backgroundFillFlags_0;
            if (dxfMtext.backgroundFillInfo_0 == null)
            {
                this.backgroundFillInfo_0 = (BackgroundFillInfo)null;
            }
            else
            {
                this.backgroundFillInfo_0 = dxfMtext.backgroundFillInfo_0.Clone(cloneContext);
            }
        }
コード例 #2
0
ファイル: DxfMText.cs プロジェクト: 15831944/WW
        public override IGraphCloneable Clone(CloneContext cloneContext)
        {
            DxfMText dxfMtext = (DxfMText)cloneContext.GetExistingClone((IGraphCloneable)this);

            if (dxfMtext == null)
            {
                dxfMtext = new DxfMText();
                cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)dxfMtext);
                dxfMtext.CopyFrom((DxfHandledObject)this, cloneContext);
            }
            return((IGraphCloneable)dxfMtext);
        }
コード例 #3
0
ファイル: DxfAttributeBase.cs プロジェクト: 15831944/WW
        public override void DrawInternal(
            DrawContext.Surface context,
            ISurfaceGraphicsFactory graphicsFactory)
        {
            if (!this.IsVisible((DrawContext)context))
            {
                return;
            }
            DxfMText dxfMtext = this.method_20(context.Config);

            if (dxfMtext != null)
            {
                dxfMtext.DrawInternal(context, graphicsFactory);
            }
            else
            {
                base.DrawInternal(context, graphicsFactory);
            }
        }
コード例 #4
0
        public override void DrawInternal(
            DrawContext.Wireframe context,
            IWireframeGraphicsFactory2 graphicsFactory)
        {
            if (!this.IsVisible((DrawContext)context))
            {
                return;
            }
            DxfMText dxfMtext = this.method_21();

            if (dxfMtext != null)
            {
                dxfMtext.DrawInternal(context, graphicsFactory);
            }
            else
            {
                base.DrawInternal(context, graphicsFactory);
            }
        }
コード例 #5
0
ファイル: DxfAttributeBase.cs プロジェクト: 15831944/WW
        public override void DrawInternal(
            DrawContext.Surface context,
            Graphics graphics,
            IGraphicElementBlock parentGraphicElementBlock)
        {
            if (!this.IsVisible((DrawContext)context))
            {
                return;
            }
            DxfMText dxfMtext = this.method_20(context.Config);

            if (dxfMtext != null)
            {
                dxfMtext.DrawInternal(context, graphics, parentGraphicElementBlock);
            }
            else
            {
                base.DrawInternal(context, graphics, parentGraphicElementBlock);
            }
        }
コード例 #6
0
ファイル: DxfAttributeBase.cs プロジェクト: 15831944/WW
 internal DxfMText method_21()
 {
     if (this.ExtensionDictionary != null)
     {
         DxfObject valueByName = this.ExtensionDictionary.GetValueByName("ACAD_MLATT");
         if (valueByName is DxfXRecord)
         {
             DxfXRecord dxfXrecord            = (DxfXRecord)valueByName;
             int        num                   = 0;
             DxfXRecordValueCollection values = dxfXrecord.Values;
             while (num < values.Count)
             {
                 DxfXRecordValue dxfXrecordValue = values[num++];
                 if (dxfXrecordValue.Code == (short)1 && "Embedded Object".Equals(dxfXrecordValue.Value.ToString()))
                 {
                     break;
                 }
             }
             if (num < values.Count)
             {
                 DxfXRecordValueCollection xrecordValueCollection = new DxfXRecordValueCollection();
                 xrecordValueCollection.AddRange((IEnumerable <DxfXRecordValue>) new DxfXRecordValue[5]
                 {
                     new DxfXRecordValue((short)0, (object)"MTEXT"),
                     new DxfXRecordValue((short)100, (object)"AcDbEntity"),
                     new DxfXRecordValue((short)8, (object)this.Layer.Name),
                     new DxfXRecordValue((short)67, (object)(short)(this.PaperSpace ? 1 : 0)),
                     new DxfXRecordValue((short)100, (object)"AcDbMText")
                 });
                 while (num < values.Count)
                 {
                     xrecordValueCollection.Add(values[num++]);
                 }
                 Struct18 endGroup = new Struct18(0, (object)"ENDSIM");
                 DxfModel model    = this.Model;
                 if (model == null)
                 {
                     throw new Exception("Cannot get MTEXT substitute when attribute has no parent object.");
                 }
                 DxfMText dxfMtext = DxfReader.smethod_1(model, (Interface33) new Class720(endGroup, (IEnumerable <DxfXRecordValue>)xrecordValueCollection), endGroup) as DxfMText;
                 if (dxfMtext != null)
                 {
                     dxfMtext.method_12((DxfEntity)this);
                     dxfMtext.Style = this.Style;
                     if (this.IsAnnotative)
                     {
                         dxfMtext.IsAnnotative = true;
                         dxfMtext.vmethod_2((IDxfHandledObject)this);
                         DxfDictionary dxfDictionary1 = DxfAnnotationScaleObjectContextData.smethod_7((DxfHandledObject)this, true);
                         DxfDictionary dxfDictionary2 = DxfAnnotationScaleObjectContextData.smethod_7((DxfHandledObject)dxfMtext, true);
                         foreach (IDictionaryEntry entry in (ActiveList <IDictionaryEntry>)dxfDictionary1.Entries)
                         {
                             dxfDictionary2.Entries.Add((IDictionaryEntry) new DxfDictionaryEntry("*A", (DxfObject)((DxfAttributeObjectContextData)entry.Value).Mtext));
                         }
                     }
                     return(dxfMtext);
                 }
             }
         }
     }
     return((DxfMText)null);
 }
コード例 #7
0
 public virtual void Visit(DxfMText mtext)
 {
 }
コード例 #8
0
 public virtual void Visit(DxfMText mtext)
 {
     this.VisitEntity((DxfEntity)mtext);
 }