• 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/Entities/HatchGradientPattern.cs
1
using ACadSharp.Attributes;
2
using System.Collections.Generic;
3

4
namespace ACadSharp.Entities
5
{
6
        public class HatchGradientPattern
7
        {
8
                /// <summary>
9
                /// Indicates solid hatch or gradient
10
                /// </summary>
11
                [DxfCodeValue(450)]
12
                public bool Enabled { get; set; } = false;
×
13

14
                /// <summary>
15
                /// Zero is reserved for future use
16
                /// </summary>
17
                [DxfCodeValue(451)]
18
                internal int Reserved { get; set; }
×
19

20
                /// <summary>
21
                /// Rotation angle in radians for gradients (default = 0, 0)
22
                /// </summary>
23
                [DxfCodeValue(460)]
24
                public double Angle { get; set; }
×
25

26
                /// <summary>
27
                /// Gradient definition; corresponds to the Centered option on the Gradient Tab of the Boundary Hatch and Fill dialog box.
28
                /// Each gradient has two definitions, shifted and non-shifted. 
29
                /// A Shift value describes the blend of the two definitions that should be used. A value of 0.0 means only the non-shifted version should be used, and a value of 1.0 means that only the shifted version should be used.
30
                /// </summary>
31
                [DxfCodeValue(461)]
32
                public double Shift { get; set; }
×
33

34
                /// <summary>
35
                /// Records how colors were defined and is used only by dialog code
36
                /// </summary>
37
                /// <remarks>
38
                /// 0 = Two-color gradient <br/>
39
                /// 1 = Single-color gradient
40
                /// </remarks>
41
                [DxfCodeValue(452)]
42
                public bool IsSingleColorGradient { get; set; }
×
43

44
                /// <summary>
45
                /// Color tint value used by dialog code (default = 0, 0; range is 0.0 to 1.0). The color tint value is a gradient color and controls the degree of tint in the dialog when the Hatch group code 452 is set to 1.
46
                /// </summary>
47
                [DxfCodeValue(462)]
48
                public double ColorTint { get; set; }
×
49

50
                /// <summary>
51
                /// Colors in the gradient
52
                /// </summary>
53
                /// <remarks>
54
                /// 0 = Solid hatch <br/>
55
                /// 2 = Gradient
56
                /// </remarks>
57
                [DxfCodeValue(453)]
58
                public List<GradientColor> Colors { get; set; } = new List<GradientColor>();
×
59

60
                /// <summary>
61
                /// Name of the gradient 
62
                /// </summary>
63
                [DxfCodeValue(470)]
64
                public string Name { get; set; }
×
65

66
                public HatchGradientPattern() : base() { }
×
67

68
                public HatchGradientPattern(string name)
×
69
                {
×
70
                        this.Name = name;
×
71
                }
×
72

73
                public HatchGradientPattern Clone()
74
                {
×
75
                        HatchGradientPattern clone = (HatchGradientPattern)this.MemberwiseClone();
×
76

77
                        clone.Colors.Clear();
×
78
                        foreach (var item in this.Colors)
×
79
                        {
×
80
                                clone.Colors.Add(item.Clone());
×
81
                        }
×
82

83
                        return clone;
×
84
                }
×
85
        }
86
}
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