/// <summary> /// Initializes a new instance of the <c>Leader</c> class. /// </summary> public Leader(Block block, IEnumerable <Vector2> vertexes, DimensionStyle style) : base(EntityType.Leader, DxfObjectCode.Leader) { if (vertexes == null) { throw new ArgumentNullException(nameof(vertexes)); } this.vertexes = new List <Vector2>(vertexes); if (this.vertexes.Count < 2) { throw new ArgumentOutOfRangeException(nameof(vertexes), this.vertexes.Count, "The leader vertexes list requires at least two points."); } this.style = style; this.hasHookLine = false; this.showArrowhead = true; this.pathType = LeaderPathType.StraightLineSegements; this.textPosition = LeaderTextVerticalPosition.Above; this.lineColor = AciColor.ByLayer; this.elevation = 0.0; this.offset = Vector2.Zero; this.annotation = this.BuildAnnotation(block); this.annotation.AddReactor(this); this.styleOverrides = new DimensionStyleOverrideDictionary(); this.styleOverrides.BeforeAddItem += this.StyleOverrides_BeforeAddItem; this.styleOverrides.AddItem += this.StyleOverrides_AddItem; this.styleOverrides.BeforeRemoveItem += this.StyleOverrides_BeforeRemoveItem; this.styleOverrides.RemoveItem += this.StyleOverrides_RemoveItem; }
/// <summary> /// Initializes a new instance of the <c>Leader</c> class. /// </summary> public Leader(IList <Vector2> vertexes, DimensionStyle style) : base(EntityType.Leader, DxfObjectCode.Leader) { if (vertexes == null) { throw new ArgumentNullException(nameof(vertexes)); } if (vertexes.Count < 2) { throw new ArgumentOutOfRangeException(nameof(vertexes), "The leader vertexes list requires at least two points."); } this.vertexes = new List <Vector2>(vertexes); this.style = style; this.hasHookline = false; this.showArrowhead = true; this.pathType = LeaderPathType.StraightLineSegements; this.annotation = null; this.textPosition = LeaderTextVerticalPosition.Above; this.lineColor = AciColor.ByLayer; this.elevation = 0.0; this.offset = Vector2.Zero; }
/// <summary> /// Initializes a new instance of the <c>Leader</c> class. /// </summary> public Leader(IList<Vector2> vertexes, DimensionStyle style) : base(EntityType.Leader, DxfObjectCode.Leader) { if (vertexes == null) throw new ArgumentNullException(nameof(vertexes)); if (vertexes.Count < 2) throw new ArgumentOutOfRangeException(nameof(vertexes), "The leader vertexes list requires at least two points."); this.vertexes = new List<Vector2>(vertexes); this.style = style; this.hasHookline = false; this.showArrowhead = true; this.pathType = LeaderPathType.StraightLineSegements; this.annotation = null; this.textPosition = LeaderTextVerticalPosition.Above; this.lineColor = AciColor.ByLayer; this.elevation = 0.0; this.offset = Vector2.Zero; }