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

DomCR / ACadSharp / 18274536123

06 Oct 2025 08:19AM UTC coverage: 78.371% (+0.4%) from 77.996%
18274536123

Pull #774

github

web-flow
Merge 14beb659f into f6528e6f8
Pull Request #774: patterns def

6855 of 9497 branches covered (72.18%)

Branch coverage included in aggregate %.

163 of 214 new or added lines in 8 files covered. (76.17%)

6 existing lines in 1 file now uncovered.

26386 of 32918 relevant lines covered (80.16%)

109026.08 hits per line

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

47.37
/src/ACadSharp/Entities/HatchPattern.Line.cs
1
using ACadSharp.Attributes;
2
using CSMath;
3
using System;
4
using System.Collections.Generic;
5

6
namespace ACadSharp.Entities
7
{
8
        public partial class HatchPattern
9
        {
10
                public class Line
11
                {
12
                        /// <summary>
13
                        /// Pattern line angle.
14
                        /// </summary>
15
                        [DxfCodeValue(DxfReferenceType.IsAngle, 53)]
16
                        public double Angle { get; set; }
201,306✔
17

18
                        /// <summary>
19
                        /// Pattern line base point.
20
                        /// </summary>
21
                        [DxfCodeValue(43, 44)]
22
                        public XY BasePoint { get; set; }
194,593✔
23

24
                        /// <summary>
25
                        /// Line dashes.
26
                        /// </summary>
27
                        [DxfCodeValue(DxfReferenceType.Count, 79)]
28
                        [DxfCollectionCodeValue(49)]
29
                        public List<double> DashLengths { get; set; } = new List<double>();
543,680✔
30

31
                        /// <summary>
32
                        /// Gets or sets the local displacements between lines of the same family.
33
                        /// </summary>
34
                        [DxfCodeValue(45, 46)]
35
                        public XY Offset { get; set; }
313,601✔
36

37
                        public double Shift
38
                        {
39
                                get
NEW
40
                                {
×
NEW
41
                                        double cos = Math.Cos(0.0 - this.Angle);
×
NEW
42
                                        double sin = Math.Sin(0.0 - this.Angle);
×
43

NEW
44
                                        return this.Offset.X * cos - this.Offset.Y * sin;
×
NEW
45
                                }
×
46
                        }
47

48
                        /// <summary>
49
                        /// Perpendicular distance for the next line to be located.
50
                        /// </summary>
51
                        public double LineOffset
52
                        {
53
                                get
54
                                {
68✔
55
                                        double cos = Math.Cos(0.0 - this.Angle);
68✔
56
                                        double sin = Math.Sin(0.0 - this.Angle);
68✔
57

58
                                        return this.Offset.X * sin + this.Offset.Y * cos;
68✔
59
                                }
68✔
60
                        }
61

62
                        /// <summary>
63
                        /// Clones this line.
64
                        /// </summary>
65
                        /// <returns></returns>
66
                        public Line Clone()
67
                        {
×
68
                                Line clone = (Line)this.MemberwiseClone();
×
69
                                clone.DashLengths = new List<double>(this.DashLengths);
×
70
                                return clone;
×
71
                        }
×
72
                }
73
        }
74
}
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