public override void CopyFrom(DxfHandledObject from, CloneContext cloneContext) { base.CopyFrom(from, cloneContext); DxfInsert dxfInsert = (DxfInsert)from; this.ushort_0 = dxfInsert.ushort_0; this.double_1 = dxfInsert.double_1; this.ushort_1 = dxfInsert.ushort_1; this.double_2 = dxfInsert.double_2; }
public Class1022( DxfInsert insert, DrawContext.Surface drawContext, Graphics graphics, IGraphicElementBlock parentGraphicElementBlock, GraphicElementInsert graphicElementInsert) { this.method_0((DxfEntity)insert, drawContext, graphics, parentGraphicElementBlock, graphicElementInsert); graphicElementInsert.InsertCells = new GraphicElementInsert.InsertCell[(int)insert.RowCount, (int)insert.ColumnCount]; graphicElementInsert.AttributeBlockCells = new Matrix4D[(int)insert.RowCount, (int)insert.ColumnCount]; }
public override IGraphCloneable Clone(CloneContext cloneContext) { DxfInsert dxfInsert = (DxfInsert)cloneContext.GetExistingClone((IGraphCloneable)this); if (dxfInsert == null) { dxfInsert = new DxfInsert(); cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)dxfInsert); dxfInsert.CopyFrom((DxfHandledObject)this, cloneContext); } return((IGraphCloneable)dxfInsert); }
internal void method_0( DxfTableContent tableContent, double width, double height, double rotation, double horizontalMargin, double verticalMargin) { DxfBlock valueObject = this.ValueObject as DxfBlock; if (valueObject == null) { this.dxfContentFormat_0.method_6(1.0); } else { DxfInsert dxfInsert = new DxfInsert(valueObject); foreach (DxfTableAttribute dxfTableAttribute in (List <DxfTableAttribute>) this.dxfTableAttributeCollection_0) { if (dxfTableAttribute.AttributeDefinition != null) { DxfAttribute dxfAttribute1 = new DxfAttribute(dxfTableAttribute.AttributeDefinition); dxfAttribute1.Text = dxfTableAttribute.Value; DxfAttribute dxfAttribute2 = dxfAttribute1; dxfAttribute2.AlignmentPoint1 = dxfAttribute2.AlignmentPoint1 - valueObject.BasePoint; if (dxfAttribute1.AlignmentPoint2.HasValue) { DxfAttribute dxfAttribute3 = dxfAttribute1; WW.Math.Point3D? alignmentPoint2 = dxfAttribute3.AlignmentPoint2; WW.Math.Vector3D basePoint = valueObject.BasePoint; dxfAttribute3.AlignmentPoint2 = alignmentPoint2.HasValue ? new WW.Math.Point3D?(alignmentPoint2.GetValueOrDefault() - basePoint) : new WW.Math.Point3D?(); } } } BoundsCalculator boundsCalculator = new BoundsCalculator(); boundsCalculator.GetBounds(tableContent.Model, (DxfEntity)dxfInsert); Bounds3D bounds = boundsCalculator.Bounds; Matrix4D transform = Transformation4D.Translation(valueObject.BasePoint) * Transformation4D.RotateZ(rotation) * Transformation4D.Translation(-valueObject.BasePoint); bounds.Transform(transform); Vector2D vector2D = new Vector2D((width - 2.0 * horizontalMargin) / bounds.Delta.X, (height - 2.0 * verticalMargin) / bounds.Delta.Y); this.dxfContentFormat_0.BlockScale = System.Math.Min(vector2D.X, vector2D.Y); } }
internal override void vmethod_10(DxfModel model) { base.vmethod_10(model); DxfAnnotationScaleObjectContextData.smethod_8((DxfEntity)this); this.bool_2 = Class1064.smethod_0((DxfHandledObject)this.Block, model); if (!this.bool_2 || DxfAnnotationScaleObjectContextData.smethod_5((DxfHandledObject)this, true) != null) { return; } DxfScale currentAnnotationScale = model.Header.CurrentAnnotationScale; DxfInsert dxfInsert = this; dxfInsert.scaleFactor = dxfInsert.scaleFactor / currentAnnotationScale.ScaleFactor; DxfDictionary dxfDictionary = DxfAnnotationScaleObjectContextData.smethod_6((DxfHandledObject)this); DxfAnnotationScaleObjectContextData contextData = this.CreateContextData(currentAnnotationScale); contextData.IsDefault = true; dxfDictionary.Entries.Add((IDictionaryEntry) new DxfDictionaryEntry("*A", (DxfObject)contextData)); }
internal Bounds3D method_1(DxfTable table) { DxfBlock valueObject = this.ValueObject as DxfBlock; if (valueObject == null) { return((Bounds3D)null); } DxfInsert dxfInsert = new DxfInsert(valueObject); foreach (DxfTableAttribute dxfTableAttribute in (List <DxfTableAttribute>) this.dxfTableAttributeCollection_0) { if (dxfTableAttribute.AttributeDefinition != null) { DxfAttribute dxfAttribute1 = new DxfAttribute(dxfTableAttribute.AttributeDefinition); dxfAttribute1.Text = dxfTableAttribute.Value; DxfAttribute dxfAttribute2 = dxfAttribute1; dxfAttribute2.AlignmentPoint1 = dxfAttribute2.AlignmentPoint1 - valueObject.BasePoint; if (dxfAttribute1.AlignmentPoint2.HasValue) { DxfAttribute dxfAttribute3 = dxfAttribute1; WW.Math.Point3D? alignmentPoint2 = dxfAttribute3.AlignmentPoint2; WW.Math.Vector3D basePoint = valueObject.BasePoint; dxfAttribute3.AlignmentPoint2 = alignmentPoint2.HasValue ? new WW.Math.Point3D?(alignmentPoint2.GetValueOrDefault() - basePoint) : new WW.Math.Point3D?(); } } } BoundsCalculator boundsCalculator = new BoundsCalculator(); boundsCalculator.GetBounds(table.Content.Model, (DxfEntity)dxfInsert); Bounds3D bounds = boundsCalculator.Bounds; Matrix4D transform = Transformation4D.Translation(valueObject.BasePoint) * Transformation4D.RotateZ(this.dxfContentFormat_0.Rotation) * Transformation4D.Translation(-valueObject.BasePoint); bounds.Transform(transform); return(bounds); }
public virtual void Visit(DxfInsert insert) { }
public virtual void Visit(DxfInsert insert) { this.VisitInsertBase((DxfInsertBase)insert); }