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

DomCR / ACadSharp / 18346055955

08 Oct 2025 01:19PM UTC coverage: 78.364% (+0.4%) from 77.952%
18346055955

push

github

web-flow
Merge pull request #774 from DomCR/svg-hatch

patterns def

6854 of 9493 branches covered (72.2%)

Branch coverage included in aggregate %.

191 of 211 new or added lines in 9 files covered. (90.52%)

9 existing lines in 2 files now uncovered.

26384 of 32922 relevant lines covered (80.14%)

108865.14 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
                        /// Perpendicular distance for the next line to be located.
33
                        /// </summary>
34
                        public double LineOffset
35
                        {
36
                                get
37
                                {
68✔
38
                                        double cos = Math.Cos(0.0 - this.Angle);
68✔
39
                                        double sin = Math.Sin(0.0 - this.Angle);
68✔
40

41
                                        return this.Offset.X * sin + this.Offset.Y * cos;
68✔
42
                                }
68✔
43
                        }
44

45
                        /// <summary>
46
                        /// Gets or sets the local displacements between lines of the same family.
47
                        /// </summary>
48
                        [DxfCodeValue(45, 46)]
49
                        public XY Offset { get; set; }
313,601✔
50

51
                        /// <summary>
52
                        /// Gets the horizontal shift of the offset after applying the specified angle transformation.
53
                        /// </summary>
54
                        public double Shift
55
                        {
56
                                get
NEW
57
                                {
×
NEW
58
                                        double cos = Math.Cos(0.0 - this.Angle);
×
NEW
59
                                        double sin = Math.Sin(0.0 - this.Angle);
×
60

NEW
61
                                        return this.Offset.X * cos - this.Offset.Y * sin;
×
NEW
62
                                }
×
63
                        }
64

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

© 2025 Coveralls, Inc