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

DomCR / ACadSharp / 14223596880

02 Apr 2025 03:32PM UTC coverage: 75.482% (-0.9%) from 76.343%
14223596880

Pull #457

github

web-flow
Merge 8207ad8e0 into 04434c5d6
Pull Request #457: Geometric transform

5605 of 8152 branches covered (68.76%)

Branch coverage included in aggregate %.

264 of 713 new or added lines in 47 files covered. (37.03%)

283 existing lines in 15 files now uncovered.

22349 of 28882 relevant lines covered (77.38%)

72711.93 hits per line

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

78.95
/src/ACadSharp/Entities/UnderlayEntity.cs
1
using ACadSharp.Attributes;
2
using ACadSharp.Objects;
3
using CSMath;
4
using System;
5

6
namespace ACadSharp.Entities
7
{
8
        /// <summary>
9
        /// Common base class for all underlay entities, like <see cref="PdfUnderlay" />.
10
        /// </summary>
11
        [DxfSubClass(null, true)]
12
        public abstract class UnderlayEntity : Entity
13
        {
14
                /// <inheritdoc/>
15
                public override string SubclassMarker => DxfSubclassMarker.Underlay;
2✔
16

17
                /// <summary>
18
                /// Specifies the three-dimensional normal unit vector for the object.
19
                /// </summary>
20
                [DxfCodeValue(210, 220, 230)]
21
                public XYZ Normal { get; set; } = XYZ.AxisZ;
11✔
22

23
                /// <summary>
24
                /// Insertion point(in WCS)
25
                /// </summary>
26
                [DxfCodeValue(10, 20, 30)]
27
                public XYZ InsertPoint { get; set; }
5✔
28

29
                /// <summary>
30
                /// X scale factor 
31
                /// </summary>
32
                [DxfCodeValue(41)]
33
                public double XScale { get; set; } = 1;
11✔
34

35
                /// <summary>
36
                /// Y scale factor 
37
                /// </summary>
38
                [DxfCodeValue(42)]
39
                public double YScale { get; set; } = 1;
11✔
40

41
                /// <summary>
42
                /// Z scale factor 
43
                /// </summary>
44
                [DxfCodeValue(43)]
45
                public double ZScale { get; set; } = 1;
11✔
46

47
                /// <summary>
48
                /// Specifies the rotation angle for the object.
49
                /// </summary>
50
                /// <value>
51
                /// The rotation angle in radians.
52
                /// </value>
53
                [DxfCodeValue(DxfReferenceType.IsAngle, 50)]
54
                public double Rotation { get; set; } = 0.0;
11✔
55

56
                /// <summary>
57
                /// Underlay display options.
58
                /// </summary>
59
                [DxfCodeValue(280)]
60
                public UnderlayDisplayFlags Flags { get; set; }
×
61

62
                /// <summary>
63
                /// Contrast
64
                /// </summary>
65
                /// <remarks>
66
                /// 0-100; default = 50
67
                /// </remarks>
68
                [DxfCodeValue(281)]
69
                public byte Contrast
70
                {
71
                        get { return this._contrast; }
×
72
                        set
73
                        {
5✔
74
                                if (value < 0 || value > 100)
5!
75
                                {
3✔
76
                                        throw new ArgumentException($"Invalid Brightness value: {value}, must be in range 0-100");
3✔
77
                                }
78

79
                                this._contrast = value;
2✔
80
                        }
2✔
81
                }
82

83
                /// <summary>
84
                /// Fade
85
                /// </summary>
86
                /// <value>
87
                /// Range: 0 - 100 <br/>
88
                /// Default: 0
89
                /// </value>
90
                [DxfCodeValue(282)]
91
                public byte Fade
92
                {
93
                        get { return this._fade; }
×
94
                        set
95
                        {
5✔
96
                                if (value < 0 || value > 100)
5!
97
                                {
3✔
98
                                        throw new ArgumentException($"Invalid Brightness value: {value}, must be in range 0-100");
3✔
99
                                }
100

101
                                this._fade = value;
2✔
102
                        }
2✔
103
                }
104

105
                [DxfCodeValue(DxfReferenceType.Handle, 340)]
106
                public UnderlayDefinition Definition { get; set; }
×
107

108
                private byte _contrast = 50;
6✔
109
                private byte _fade = 0;
6✔
110

111
                /// <inheritdoc/>
112
                public override BoundingBox GetBoundingBox()
113
                {
1✔
114
                        return BoundingBox.Null;
1✔
115
                }
1✔
116

117
                public override void ApplyTransform(Transform transform)
NEW
118
                {
×
NEW
119
                        throw new NotImplementedException();
×
120
                }
121
        }
122
}
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