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

DomCR / ACadSharp / 29143042407

11 Jul 2026 06:34AM UTC coverage: 2.912% (-73.0%) from 75.918%
29143042407

push

github

web-flow
Merge pull request #1146 from ilCosmico/acds-read-payload-anchor

Read the AcDs payload area offset from the data segment header

264 of 12999 branches covered (2.03%)

Branch coverage included in aggregate %.

0 of 30 new or added lines in 1 file covered. (0.0%)

31243 existing lines in 465 files now uncovered.

1337 of 41984 relevant lines covered (3.18%)

5.38 hits per line

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

0.0
/src/ACadSharp/Objects/PlotSettings.cs
1
using ACadSharp.Attributes;
2
using CSMath;
3
using System;
4

5
namespace ACadSharp.Objects
6
{
7
        /// <summary>
8
        /// Represents a <see cref="PlotSettings"/> object
9
        /// </summary>
10
        /// <remarks>
11
        /// Object name <see cref="DxfFileToken.ObjectPlotSettings"/> <br/>
12
        /// Dxf class name <see cref="DxfSubclassMarker.PlotSettings"/>
13
        /// </remarks>
14
        [DxfName(DxfFileToken.ObjectPlotSettings)]
15
        [DxfSubClass(DxfSubclassMarker.PlotSettings)]
16
        public class PlotSettings : NonGraphicalObject
17
        {
18
                /// <summary>
19
                /// Denominator of custom print scale: drawing units
20
                /// </summary>
21
                [DxfCodeValue(143)]
22
                public double DenominatorScale
23
                {
UNCOV
24
                        get { return this._denominatorScale; }
×
25
                        set
UNCOV
26
                        {
×
UNCOV
27
                                if (value <= 0.0)
×
28
                                {
×
29
                                        throw new ArgumentOutOfRangeException(nameof(this.DenominatorScale), value, "Value must be greater than zero");
×
30
                                }
31

UNCOV
32
                                this._denominatorScale = value;
×
UNCOV
33
                        }
×
34
                }
35

36
                /// <summary>
37
                /// Plot layout flags
38
                /// </summary>
39
                [DxfCodeValue(70)]
UNCOV
40
                public PlotFlags Flags { get; set; } = PlotFlags.DrawViewportsFirst | PlotFlags.PrintLineweights | PlotFlags.PlotPlotStyles | PlotFlags.UseStandardScale;
×
41

42
                /// <summary>
43
                /// Numerator of custom print scale: real world(paper) units
44
                /// </summary>
45
                [DxfCodeValue(142)]
46
                public double NumeratorScale
47
                {
UNCOV
48
                        get { return this._numeratorScale; }
×
49
                        set
UNCOV
50
                        {
×
UNCOV
51
                                if (value <= 0.0)
×
52
                                {
×
53
                                        throw new ArgumentOutOfRangeException(nameof(this.NumeratorScale), value, "Value must be greater than zero");
×
54
                                }
55

UNCOV
56
                                this._numeratorScale = value;
×
UNCOV
57
                        }
×
58
                }
59

60
                /// <inheritdoc/>
61
                public override string ObjectName => DxfFileToken.ObjectPlotSettings;
×
62

63
                /// <inheritdoc/>
64
                public override ObjectType ObjectType => ObjectType.UNLISTED;
×
65

66
                /// <summary>
67
                /// Page Setup name
68
                /// </summary>
69
                [DxfCodeValue(1)]
UNCOV
70
                public string PageName { get; set; } = "none_device";
×
71

72
                /// <summary>
73
                /// Physical paper height in millimeters.
74
                /// </summary>
75
                [DxfCodeValue(45)]
UNCOV
76
                public double PaperHeight { get; set; } = 210;
×
77

78
                /// <summary>
79
                /// Paper image origin
80
                /// </summary>
UNCOV
81
                public XY PaperImageOrigin { get; set; }
×
82

83
                /// <summary>
84
                /// Paper image origin: X value
85
                /// </summary>
86
                [DxfCodeValue(148)]
UNCOV
87
                public double PaperImageOriginX { get; set; }
×
88

89
                /// <summary>
90
                /// Paper image origin: Y value
91
                /// </summary>
92
                [DxfCodeValue(149)]
UNCOV
93
                public double PaperImageOriginY { get; set; }
×
94

95
                /// <summary>
96
                /// Plot paper rotation.
97
                /// </summary>
98
                [DxfCodeValue(73)]
UNCOV
99
                public PlotRotation PaperRotation { get; set; }
×
100

101
                /// <summary>
102
                /// Paper size
103
                /// </summary>
104
                [DxfCodeValue(4)]
UNCOV
105
                public string PaperSize { get; set; } = "ISO_A4_(210.00_x_297.00_MM)";
×
106

107
                /// <summary>
108
                /// Plot paper units.
109
                /// </summary>
110
                [DxfCodeValue(72)]
UNCOV
111
                public PlotPaperUnits PaperUnits { get; set; } = PlotPaperUnits.Millimeters;
×
112

113
                /// <summary>
114
                /// Physical paper width in millimeters.
115
                /// </summary>
116
                [DxfCodeValue(44)]
UNCOV
117
                public double PaperWidth { get; set; } = 297;
×
118

119
                /// <summary>
120
                /// Plot origin: X value of origin offset in millimeters
121
                /// </summary>
122
                [DxfCodeValue(46)]
UNCOV
123
                public double PlotOriginX { get; set; }
×
124

125
                /// <summary>
126
                /// Plot origin: Y value of origin offset in millimeters
127
                /// </summary>
128
                [DxfCodeValue(47)]
UNCOV
129
                public double PlotOriginY { get; set; }
×
130

131
                /// <summary>
132
                /// Portion of paper space to output to the media
133
                /// </summary>
134
                [DxfCodeValue(74)]
UNCOV
135
                public PlotType PlotType { get; set; } = PlotType.DrawingExtents;
×
136

137
                /// <summary>
138
                /// Plot view name
139
                /// </summary>
140
                [DxfCodeValue(6)]
UNCOV
141
                public string PlotViewName { get; set; }
×
142

143
                /// <summary>
144
                /// Gets the scale factor.
145
                /// </summary>
146
                public double PrintScale
147
                {
UNCOV
148
                        get { return this.NumeratorScale / this.DenominatorScale; }
×
149
                }
150

151
                /// <summary>
152
                /// Standard scale type
153
                /// </summary>
154
                [DxfCodeValue(75)]
UNCOV
155
                public ScaledType ScaledFit { get; set; }
×
156

157
                /// <summary>
158
                /// Shade plot custom DPI.
159
                /// </summary>
160
                /// <remarks>
161
                /// Only applied when the ShadePlot resolution level is set to 5 (Custom)
162
                /// </remarks>
163
                /// <value>
164
                /// Valid shade plot DPI values range from 100 to 23767.
165
                /// </value>
166
                [DxfCodeValue(78)]
167
                public short ShadePlotDPI
168
                {
UNCOV
169
                        get { return this._shadePlotDPI; }
×
170
                        set
UNCOV
171
                        {
×
UNCOV
172
                                if (value < 100 || value > 32767)
×
UNCOV
173
                                        throw new ArgumentOutOfRangeException(nameof(value), value, "The valid shade plot DPI values range from 100 to 23767.");
×
UNCOV
174
                                this._shadePlotDPI = value;
×
UNCOV
175
                        }
×
176
                }
177

178
                /// <summary>
179
                ///ShadePlot ID/Handle(optional)
180
                /// </summary>
181
                [DxfCodeValue(DxfReferenceType.Ignored, 333)]
UNCOV
182
                public ulong ShadePlotIDHandle { get; set; }
×
183

184
                /// <summary>
185
                /// Plot shade mode.
186
                /// </summary>
187
                [DxfCodeValue(76)]
UNCOV
188
                public ShadePlotMode ShadePlotMode { get; set; } = ShadePlotMode.AsDisplayed;
×
189

190
                /// <summary>
191
                /// Plot resolution.
192
                /// </summary>
193
                [DxfCodeValue(77)]
UNCOV
194
                public ShadePlotResolutionMode ShadePlotResolutionMode { get; set; } = ShadePlotResolutionMode.Draft;
×
195

196
                /// <summary>
197
                /// A floating point scale factor that represents the standard scale value specified in code 75.
198
                /// </summary>
199
                [DxfCodeValue(147)]
UNCOV
200
                public double StandardScale { get; set; } = 1.0d;
×
201

202
                /// <summary>
203
                /// Current style sheet
204
                /// </summary>
205
                [DxfCodeValue(7)]
UNCOV
206
                public string StyleSheet { get; set; }
×
207

208
                /// <inheritdoc/>
209
                public override string SubclassMarker => DxfSubclassMarker.PlotSettings;
×
210

211
                /// <summary>
212
                /// Name of system printer or plot configuration file
213
                /// </summary>
214
                [DxfCodeValue(2)]
UNCOV
215
                public string SystemPrinterName { get; set; }
×
216

217
                /// <summary>
218
                /// Size, in millimeters, of unprintable margins of paper
219
                /// </summary>
220
                [DxfCodeValue(40, 41, 42, 43)]
UNCOV
221
                public PaperMargin UnprintableMargin { get; set; }
×
222

223
                /// <summary>
224
                /// Plot window area: X value of lower-left window corner
225
                /// </summary>
226
                [DxfCodeValue(48)]
UNCOV
227
                public double WindowLowerLeftX { get; set; }
×
228

229
                /// <summary>
230
                /// Plot window area: Y value of upper-right window corner
231
                /// </summary>
232
                [DxfCodeValue(49)]
UNCOV
233
                public double WindowLowerLeftY { get; set; }
×
234

235
                /// <summary>
236
                /// Plot window area: X value of lower-left window corner
237
                /// </summary>
238
                [DxfCodeValue(140)]
UNCOV
239
                public double WindowUpperLeftX { get; set; }
×
240

241
                /// <summary>
242
                /// Plot window area: Y value of upper-right window corner
243
                /// </summary>
244
                [DxfCodeValue(141)]
UNCOV
245
                public double WindowUpperLeftY { get; set; }
×
246

UNCOV
247
                private double _denominatorScale = 1.0d;
×
248

UNCOV
249
                private double _numeratorScale = 1.0d;
×
250

UNCOV
251
                private short _shadePlotDPI = 300;
×
252

UNCOV
253
                public PlotSettings() : base()
×
UNCOV
254
                {
×
UNCOV
255
                }
×
256

257
                public PlotSettings(string name) : base(name)
×
258
                {
×
259
                }
×
260
        }
261
}
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