public override void ResolveReferences(Class374 modelBuilder) { base.ResolveReferences(modelBuilder); DxfDimension entity = (DxfDimension)this.Entity; if (this.ulong_6 != 0UL) { DxfDimensionStyle dxfDimensionStyle = modelBuilder.method_4 <DxfDimensionStyle>(this.ulong_6); if (dxfDimensionStyle != null) { entity.DimensionStyle = dxfDimensionStyle; } } DxfExtendedData extendedData; if (entity.DimensionStyleOverrides != null && entity.ExtendedDataCollection.TryGetValue(modelBuilder.Model.AppIdAcad, out extendedData)) { Class309.smethod_0(entity.DimensionStyleOverrides, extendedData, modelBuilder); } if (this.ulong_7 == 0UL) { return; } DxfBlock dxfBlock = modelBuilder.method_4 <DxfBlock>(this.ulong_7); entity.Block = dxfBlock; }
public override void ResolveReferences(Class374 modelBuilder) { base.ResolveReferences(modelBuilder); DxfLeader entity = (DxfLeader)this.Entity; if (this.ulong_7 != 0UL) { DxfDimensionStyle dxfDimensionStyle = modelBuilder.method_4 <DxfDimensionStyle>(this.ulong_7); if (dxfDimensionStyle != null) { entity.DimensionStyle = dxfDimensionStyle; } } DxfExtendedData extendedData; if (entity.DimensionStyleOverrides != null && entity.ExtendedDataCollection.TryGetValue(modelBuilder.Model.AppIdAcad, out extendedData)) { Class309.smethod_0(entity.DimensionStyleOverrides, extendedData, modelBuilder); } if (this.nullable_3.HasValue) { entity.DimensionStyleOverrides.ArrowSize = this.nullable_3.Value / entity.DimensionStyleOverrides.ScaleFactor; } if (this.ulong_6 != 0UL) { entity.AssociatedAnnotation = modelBuilder.method_4 <DxfEntity>(this.ulong_6); } if (!this.CalculateHookLinePoint) { return; } int count = entity.Vertices.Count; entity.Vertices.Add(entity.Vertices[count - 1]); double num = entity.DimensionStyleOverrides == null ? 0.0 : entity.DimensionStyleOverrides.ArrowSize; if (entity.HookLineDirection != HookLineDirection.Same) { num = -num; } entity.Vertices[count - 1] += entity.HorizontalDirection * num; }
internal static DxfDimensionStyle smethod_5( CloneContext cloneContext, DxfDimensionStyle from) { if (from == null) { return((DxfDimensionStyle)null); } if (from.Name == null) { throw new Exception("Table record name is null."); } if (cloneContext.SourceModel == cloneContext.TargetModel) { return(from); } DxfDimensionStyle dxfDimensionStyle1 = (DxfDimensionStyle)cloneContext.GetExistingClone((IGraphCloneable)from); if (dxfDimensionStyle1 == null) { cloneContext.TargetModel.DimensionStyles.TryGetValue(from.Name, out dxfDimensionStyle1); } if (dxfDimensionStyle1 == null) { switch (cloneContext.ReferenceResolutionType) { case ReferenceResolutionType.CloneMissing: DxfDimensionStyle dxfDimensionStyle2 = (DxfDimensionStyle)from.Clone(cloneContext); if (!cloneContext.CloneExact) { cloneContext.TargetModel.DimensionStyles.Add(dxfDimensionStyle2); } dxfDimensionStyle1 = dxfDimensionStyle2; break; case ReferenceResolutionType.FailOnMissing: throw new DxfException(string.Format("Could not resolve reference to dimension style with name {0}.", (object)from.Name)); } } return(dxfDimensionStyle1); }
internal double Draw( DxfTolerance tolerance, IPathDrawer pathDrawer, Matrix4D preTransform, Color color, short lineWeight, double scale) { double effectiveTextHeight = DxfDimensionStyle.GetEffectiveTextHeight((IDimensionStyle)tolerance.DimensionStyleOverrides, scale); double num1 = tolerance.dxfDimensionStyleOverrides_0.TextHeight * scale; float num2 = (float)(num1 * 0.5); Class985 resultLayoutInfo = new Class985(); IList <Class908> class908List = Class666.smethod_0(this.string_0, effectiveTextHeight, tolerance.DimensionStyleOverrides.TextStyle, tolerance.DimensionStyleOverrides.TextStyle.WidthFactor, color, lineWeight, preTransform * Transformation4D.Translation((double)num2, 0.0, 0.0), resultLayoutInfo, Enum24.flag_3); float x = (float)resultLayoutInfo.Bounds.Corner2.X; float num3 = (float)(num1 * 2.0 * 0.5); Rectangle2D rectangle2D = new Rectangle2D(0.0, -(double)num3, (double)x + (double)num2 * 2.0, 2.0 * (double)num3 - (double)num3); pathDrawer.DrawPath((IShape2D)rectangle2D, preTransform, color, lineWeight, false, false, 0.0); foreach (Class908 class908 in (IEnumerable <Class908>)class908List) { class908.Draw(pathDrawer, Matrix4D.Identity, 0.0); } return((double)x + (double)num2 * 2.0); }
public override void ResolveReferences(Class374 modelBuilder) { base.ResolveReferences(modelBuilder); DxfDimensionStyle handledObject = (DxfDimensionStyle)this.HandledObject; if (this.ulong_2 != 0UL) { DxfTextStyle dxfTextStyle = modelBuilder.method_4 <DxfTextStyle>(this.ulong_2); if (dxfTextStyle != null) { handledObject.TextStyle = dxfTextStyle; } } else if (!string.IsNullOrEmpty(this.string_0)) { DxfTextStyle textStyleWithName = modelBuilder.Model.GetTextStyleWithName(this.string_0); if (textStyleWithName != null) { handledObject.TextStyle = textStyleWithName; } } if (this.ulong_3 != 0UL) { DxfBlock dxfBlock = modelBuilder.method_4 <DxfBlock>(this.ulong_3); handledObject.LeaderArrowBlock = dxfBlock; } else if (!string.IsNullOrEmpty(this.string_1)) { DxfBlock blockWithName = modelBuilder.Model.GetBlockWithName(this.string_1); handledObject.LeaderArrowBlock = blockWithName; } if (this.ulong_4 != 0UL) { DxfBlock dxfBlock = modelBuilder.method_4 <DxfBlock>(this.ulong_4); handledObject.ArrowBlock = dxfBlock; } else if (!string.IsNullOrEmpty(this.string_2)) { DxfBlock blockWithName = modelBuilder.Model.GetBlockWithName(this.string_2); handledObject.ArrowBlock = blockWithName; } if (this.ulong_5 != 0UL) { DxfBlock dxfBlock = modelBuilder.method_4 <DxfBlock>(this.ulong_5); handledObject.FirstArrowBlock = dxfBlock; } else if (!string.IsNullOrEmpty(this.string_3)) { DxfBlock blockWithName = modelBuilder.Model.GetBlockWithName(this.string_3); handledObject.FirstArrowBlock = blockWithName; } if (this.ulong_6 != 0UL) { DxfBlock dxfBlock = modelBuilder.method_4 <DxfBlock>(this.ulong_6); handledObject.SecondArrowBlock = dxfBlock; } else if (!string.IsNullOrEmpty(this.string_4)) { DxfBlock blockWithName = modelBuilder.Model.GetBlockWithName(this.string_4); handledObject.SecondArrowBlock = blockWithName; } if (this.ulong_7 != 0UL) { handledObject.DimensionLineLineType = modelBuilder.method_4 <DxfLineType>(this.ulong_7); } else if (!string.IsNullOrEmpty(this.string_5)) { handledObject.DimensionLineLineType = modelBuilder.Model.GetLineTypeWithName(this.string_5); } if (this.ulong_8 != 0UL) { handledObject.FirstExtensionLineLineType = modelBuilder.method_4 <DxfLineType>(this.ulong_8); } else if (!string.IsNullOrEmpty(this.string_6)) { handledObject.FirstExtensionLineLineType = modelBuilder.Model.GetLineTypeWithName(this.string_6); } if (this.ulong_9 != 0UL) { handledObject.SecondExtensionLineLineType = modelBuilder.method_4 <DxfLineType>(this.ulong_9); } else { if (string.IsNullOrEmpty(this.string_7)) { return; } handledObject.SecondExtensionLineLineType = modelBuilder.Model.GetLineTypeWithName(this.string_7); } }
public Class309(DxfDimensionStyle dimensionStyle) : base((DxfHandledObject)dimensionStyle) { }
public DxfLeader(DxfDimensionStyle dimensionStyle) { this.dxfDimensionStyleOverrides_0 = new DxfDimensionStyleOverrides(dimensionStyle, dimensionStyle.Model); }
public void Visit(DxfDimensionStyle value) { this.dxfHandledObject_0 = (DxfHandledObject)Class906.smethod_5(this.cloneContext_0, value); }
public DxfTolerance(DxfDimensionStyle dimensionStyle) { this.dxfDimensionStyleOverrides_0 = new DxfDimensionStyleOverrides(dimensionStyle, dimensionStyle.Model); }