コード例 #1
0
        public override void CopyFrom(DxfHandledObject from, CloneContext cloneContext)
        {
            base.CopyFrom(from, cloneContext);
            DxfAttributeDefinition attributeDefinition = (DxfAttributeDefinition)from;

            this.string_6 = attributeDefinition.string_6;
            this.byte_0   = attributeDefinition.byte_0;
            this.byte_1   = attributeDefinition.byte_1;
        }
コード例 #2
0
        public override IGraphCloneable Clone(CloneContext cloneContext)
        {
            DxfAttributeDefinition attributeDefinition = (DxfAttributeDefinition)cloneContext.GetExistingClone((IGraphCloneable)this);

            if (attributeDefinition == null)
            {
                attributeDefinition = new DxfAttributeDefinition();
                cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)attributeDefinition);
                attributeDefinition.CopyFrom((DxfHandledObject)this, cloneContext);
            }
            return((IGraphCloneable)attributeDefinition);
        }
コード例 #3
0
ファイル: DxfInsert.cs プロジェクト: 15831944/WW
        public DxfAttribute AddAttribute(DxfAttributeDefinition attdef, string text)
        {
            DxfAttribute dxfAttribute = new DxfAttribute(attdef, text);

            this.Attributes.Add(dxfAttribute);
            if (dxfAttribute.Model == null)
            {
                try
                {
                    dxfAttribute.Style = attdef.Style;
                }
                catch (NullReferenceException ex)
                {
                    throw new DxfException("Cannot create attribute from attribute definition which is not attached to a model!\nDid you already add the attribute definition to a block and the block to the model's Blocks?");
                }
            }
            WW.Math.Vector3D vector3D = this.Block != null ? this.Block.BasePoint : WW.Math.Vector3D.Zero;
            dxfAttribute.FixAlignmentPoints();
            dxfAttribute.TransformMe((TransformConfig)GraphicsConfig.WhiteBackground, this.BasicBlockInsertionTransformation * Transformation4D.Translation(-vector3D));
            return(dxfAttribute);
        }
コード例 #4
0
 public virtual void Visit(DxfAttributeDefinition attributeDefinition)
 {
 }
コード例 #5
0
 public DxfAttribute(DxfAttributeDefinition attributeDefinition, string textValue)
     : this(attributeDefinition)
 {
     this.Text = textValue;
 }
コード例 #6
0
 public DxfAttribute(DxfAttributeDefinition attributeDefinition)
     : base((DxfAttributeBase)attributeDefinition)
 {
     this.byte_0 = attributeDefinition.Unknown0;
 }
コード例 #7
0
 public virtual void Visit(DxfAttributeDefinition attributeDefinition)
 {
     this.VisitEntity((DxfEntity)attributeDefinition);
 }