• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

DomCR / ACadSharp / 12905761471

22 Jan 2025 10:03AM UTC coverage: 2.0% (-74.0%) from 75.963%
12905761471

push

github

DomCR
version 1.0.6

104 of 7676 branches covered (1.35%)

Branch coverage included in aggregate %.

590 of 27024 relevant lines covered (2.18%)

5.13 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/ACadSharp/Objects/MultiLeaderAnnotContextClasses.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using ACadSharp.Attributes;
5
using ACadSharp.Tables;
6

7
using CSMath;
8

9

10
namespace ACadSharp.Objects
11
{
12

13
        /// <summary>
14
        /// Nested classes in MultiLeaderAnnotContext
15
        /// </summary>
16
        public partial class MultiLeaderAnnotContext : NonGraphicalObject
17
        {
18
                /// <summary>
19
                /// Represents a leader root
20
                /// </summary>
21
                /// <remarks>
22
                /// Appears in DXF as 302 DXF: “LEADER“
23
                /// </remarks>
24
                public class LeaderRoot : ICloneable
25
                {
26
                        public LeaderRoot() { }
×
27

28
                        /// <summary>
29
                        /// Is content valid (ODA writes true)
30
                        /// </summary>
31
                        [DxfCodeValue(290)]
32
                        public bool ContentValid { get; set; }
×
33

34
                        /// <summary>
35
                        /// Unknown (ODA writes true)
36
                        /// </summary>
37
                        [DxfCodeValue(291)]
38
                        public bool Unknown { get; set; }
×
39

40
                        /// <summary>
41
                        /// Connection point
42
                        /// </summary>
43
                        [DxfCodeValue(10, 20, 30)]
44
                        public XYZ ConnectionPoint { get; set; }
×
45

46
                        /// <summary>
47
                        /// Direction
48
                        /// </summary>
49
                        [DxfCodeValue(11, 21, 31)]
50
                        public XYZ Direction { get; set; }
×
51

52
                        /// <summary>
53
                        /// Gets a list of <see cref="StartEndPointPair" />.
54
                        /// </summary>
55
                        public IList<StartEndPointPair> BreakStartEndPointsPairs { get; } = new List<StartEndPointPair>();
×
56

57
                        /// <summary>
58
                        /// Leader index
59
                        /// </summary>
60
                        [DxfCodeValue(90)]
61
                        public int LeaderIndex { get; set; }
×
62

63
                        /// <summary>
64
                        /// Landing distance
65
                        /// </summary>
66
                        [DxfCodeValue(40)]
67
                        public double LandingDistance { get; set; }
×
68

69
                        /// <summary>
70
                        /// Gets a list of <see cref="LeaderLine"/> objects representing
71
                        /// leader lines starting from the landing point
72
                        /// of the multi leader.
73
                        /// </summary>
74
                        public IList<LeaderLine> Lines { get; } = new List<LeaderLine>();
×
75

76
                        //R2010
77
                        /// <summary>
78
                        /// Attachment direction
79
                        /// </summary>
80
                        [DxfCodeValue(271)]
81
                        public TextAttachmentDirectionType TextAttachmentDirection { get; set; }
×
82

83
                        public object Clone()
84
                        {
×
85
                                LeaderRoot clone = (LeaderRoot)this.MemberwiseClone();
×
86

87
                                foreach (var breakStartEndPoint in BreakStartEndPointsPairs.ToList())
×
88
                                {
×
89
                                        clone.BreakStartEndPointsPairs.Add((StartEndPointPair)breakStartEndPoint.Clone());
×
90
                                }
×
91

92
                                foreach (var line in Lines.ToList())
×
93
                                {
×
94
                                        clone.Lines.Add((LeaderLine)line.Clone());
×
95
                                }
×
96

97
                                return clone;
×
98
                        }
×
99
                }
100

101
                /// <summary>
102
                /// Start/end point pairs
103
                /// 3BD        11        Start Point
104
                /// 3BD        12        End point
105
                /// </summary>
106
                public struct StartEndPointPair : ICloneable
107
                {
108
                        public StartEndPointPair(XYZ startPoint, XYZ endPoint) {
×
109
                                StartPoint = startPoint;
×
110
                                EndPoint = endPoint;
×
111
                        }
×
112

113
                        /// <summary>
114
                        /// Break start point
115
                        /// </summary>
116
                        [DxfCodeValue(12, 22, 32)]
117
                        public XYZ StartPoint { get; private set; }
×
118

119
                        /// <summary>
120
                        /// Break end point
121
                        /// </summary>
122
                        [DxfCodeValue(13, 23, 33)]
123
                        public XYZ EndPoint { get; private set; }
×
124

125
                        public object Clone()
126
                        {
×
127
                                return this.MemberwiseClone();
×
128
                        }
×
129
                }
130

131

132
                /// <summary>
133
                ///        Represents a leader line
134
                /// </summary>
135
                /// <remarks>
136
                /// Appears as 304        DXF: “LEADER_LINE“
137
                /// </remarks>
138
                public class LeaderLine : ICloneable
139
                {
140
                        public LeaderLine() { }
×
141

142
                        /// <summary>
143
                        /// Get the list of points of this <see cref="LeaderLine"/>.
144
                        /// </summary>
145
                        public IList<XYZ> Points { get; } = new List<XYZ>();
×
146

147
                        /// <summary>
148
                        /// Break info count
149
                        /// </summary>
150
                        public int BreakInfoCount { get; set; }
×
151

152
                        /// <summary>
153
                        /// Segment index
154
                        /// </summary>
155
                        [DxfCodeValue(90)]
156
                        public int SegmentIndex { get; set; }
×
157

158
                        /// <summary>
159
                        /// Start/end point pairs
160
                        /// </summary>
161
                        public IList<StartEndPointPair> StartEndPoints { get; } = new List<StartEndPointPair>();
×
162

163
                        /// <summary>
164
                        /// Leader line index.
165
                        /// </summary>
166
                        [DxfCodeValue(91)]
167
                        public int Index { get; set; }
×
168

169
                        //R2010
170
                        /// <summary>
171
                        /// Leader type
172
                        /// </summary>
173
                        [DxfCodeValue(170)]
174
                        public MultiLeaderPathType PathType { get; set; }
×
175

176
                        /// <summary>
177
                        /// Line color
178
                        /// </summary>
179
                        [DxfCodeValue(92)]
180
                        public Color LineColor { get; set; }
×
181

182
                        /// <summary>
183
                        /// Line type
184
                        /// </summary>
185
                        [DxfCodeValue(340)]
186
                        public LineType LineType { get; set; }
×
187

188
                        /// <summary>
189
                        /// Line weight
190
                        /// </summary>
191
                        [DxfCodeValue(171)]
192
                        public LineweightType LineWeight { get; set; }
×
193

194
                        /// <summary>
195
                        /// Arrowhead size
196
                        /// </summary>
197
                        [DxfCodeValue(40)]
198
                        public double ArrowheadSize { get; set; }
×
199

200
                        /// <summary>
201
                        /// Gets or sets a <see cref="BlockRecord"/> containig elements
202
                        /// to be dawn as arrow symbol.
203
                        /// </summary>
204
                        [DxfCodeValue(341)]
205
                        public BlockRecord Arrowhead { get; set; }
×
206

207
                        /// <summary>
208
                        /// Override flags
209
                        /// </summary>
210
                        [DxfCodeValue(93)]
211
                        public LeaderLinePropertOverrideFlags OverrideFlags { get; set; }
×
212

213
                        public object Clone()
214
                        {
×
215
                                LeaderLine clone = (LeaderLine)this.MemberwiseClone();
×
216

217
                                foreach (var point in Points.ToList())
×
218
                                {
×
219
                                        clone.Points.Add(point);
×
220
                                }
×
221

222
                                foreach (var startEndPoint in StartEndPoints.ToList())
×
223
                                {
×
224
                                        clone.StartEndPoints.Add((StartEndPointPair)startEndPoint.Clone());
×
225
                                }
×
226

227
                                return clone;
×
228
                        }
×
229
                }
230
        }
231
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc