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

DomCR / ACadSharp.Pdf / 19101209588

05 Nov 2025 11:58AM UTC coverage: 78.769% (-0.4%) from 79.209%
19101209588

push

github

web-flow
Merge pull request #25 from DomCR/linetype-segments

linetype segments

7125 of 9857 branches covered (72.28%)

Branch coverage included in aggregate %.

28 of 28 new or added lines in 1 file covered. (100.0%)

2163 existing lines in 56 files now uncovered.

27709 of 34366 relevant lines covered (80.63%)

103071.4 hits per line

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

17.02
/src/ACadSharp.Pdf/PdfConfiguration.cs
1
using ACadSharp.IO;
2
using System;
3
using System.Collections.Generic;
4

5
namespace ACadSharp.Pdf
6
{
7
        public class PdfConfiguration
8
        {
9
                /// <summary>
10
                /// Line weight default values.
11
                /// </summary>
UNCOV
12
                public static readonly IReadOnlyDictionary<LineWeightType, double> LineWeightDefaultValues =
×
UNCOV
13
                        new Dictionary<LineWeightType, double>()
×
UNCOV
14
                {
×
UNCOV
15
                        { LineWeightType.Default, 0 },
×
UNCOV
16
                        { LineWeightType.W0, 0.001 },
×
UNCOV
17
                        { LineWeightType.W5, 0.05 },
×
UNCOV
18
                        { LineWeightType.W9, 0.09 },
×
UNCOV
19
                        { LineWeightType.W13, 0.13 },
×
UNCOV
20
                        { LineWeightType.W15, 0.15 },
×
UNCOV
21
                        { LineWeightType.W18, 0.18 },
×
UNCOV
22
                        { LineWeightType.W20, 0.20 },
×
UNCOV
23
                        { LineWeightType.W25, 0.25 },
×
UNCOV
24
                        { LineWeightType.W30, 0.30 },
×
UNCOV
25
                        { LineWeightType.W35, 0.35 },
×
UNCOV
26
                        { LineWeightType.W40, 0.40 },
×
UNCOV
27
                        { LineWeightType.W50, 0.50 },
×
UNCOV
28
                        { LineWeightType.W53, 0.53 },
×
UNCOV
29
                        { LineWeightType.W60, 0.60 },
×
UNCOV
30
                        { LineWeightType.W70, 0.70 },
×
UNCOV
31
                        { LineWeightType.W80, 0.80 },
×
UNCOV
32
                        { LineWeightType.W90, 0.90 },
×
UNCOV
33
                        { LineWeightType.W100, 1.00 },
×
UNCOV
34
                        { LineWeightType.W106, 1.06 },
×
UNCOV
35
                        { LineWeightType.W120, 1.20 },
×
UNCOV
36
                        { LineWeightType.W140, 1.40 },
×
UNCOV
37
                        { LineWeightType.W158, 1.58 },
×
UNCOV
38
                        { LineWeightType.W200, 2.00 },
×
UNCOV
39
                        { LineWeightType.W211, 2.11 },
×
UNCOV
40
                };
×
41

42
                /// <summary>
43
                /// Notification event to get information about the export process.
44
                /// </summary>
45
                /// <remarks>
46
                /// The notification system informs about any issue or non critical errors during the export.
47
                /// </remarks>
48
                public event NotificationEventHandler OnNotification;
49

50
                /// <summary>
51
                /// Set the dot size.
52
                /// </summary>
53
                /// <remarks>
54
                /// The units used to draw the points are the same as the paper.
55
                /// </remarks>
56
                public double DotSize { get; set; } = 0.01d;
18✔
57

58
                /// <summary>
59
                /// Number of divisions performed in the arcs when drawing the shape.
60
                /// </summary>
61
                public ushort ArcPrecision { get; set; } = 256;
37✔
62

63
                /// <summary>
64
                /// Decimal format and precision set for the pdf file.
65
                /// </summary>
66
                public string DecimalFormat { get; set; } = "0.####";
15,541✔
67

68
                public Dictionary<LineWeightType, double> LineWeightValues { get; set; } = new();
9✔
69

70
                public double GetLineWeightValue(LineWeightType lineWeight)
UNCOV
71
                {
×
UNCOV
72
                        double value = 0.0d;
×
UNCOV
73
                        if (LineWeightDefaultValues.TryGetValue(lineWeight, out value))
×
UNCOV
74
                        {
×
UNCOV
75
                                return value;
×
76
                        }
77

78
                        return value;
×
UNCOV
79
                }
×
80

81
                internal void Notify(string message, NotificationType notificationType, Exception ex = null)
82
                {
19✔
83
                        this.OnNotification?.Invoke(this, new NotificationEventArgs(message, notificationType, ex));
19!
84
                }
19✔
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

© 2026 Coveralls, Inc