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

DomCR / ACadSharp / 14109396879

27 Mar 2025 02:40PM UTC coverage: 76.341% (-3.4%) from 79.72%
14109396879

push

github

web-flow
Merge pull request #211 from DomCR/Cad-to-SVG

Cad to svg

5558 of 7992 branches covered (69.54%)

Branch coverage included in aggregate %.

360 of 425 new or added lines in 9 files covered. (84.71%)

27 existing lines in 3 files now uncovered.

21991 of 28095 relevant lines covered (78.27%)

74727.25 hits per line

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

66.67
/src/ACadSharp/IO/SVG/SvgConfiguration.cs
1
using System;
2

3
namespace ACadSharp.IO
4
{
5
        /// <summary>
6
        /// Configuration for writing SVG files.
7
        /// </summary>
8
        public class SvgConfiguration : CadWriterConfiguration
9
        {
10
                /// <summary>
11
                /// The <see cref="Entities.Entity.LineWeight"/> will be divided by this value to process the stroke-width in the svg.
12
                /// </summary>
13
                public double LineWeightRatio { get; set; } = 5;
19✔
14

15
                /// <summary>
16
                /// Radius applied for the points.
17
                /// </summary>
18
                /// <remarks>
19
                /// In svg the points will be drawn as circles.
20
                /// </remarks>
21
                public double PointRadius { get; set; } = 0.5;
3✔
22

23
                /// <summary>
24
                /// Pixel size reference for the configuration.
25
                /// </summary>
26
                public const double PixelSize = 3.7795275591;
27

28
                /// <summary>
29
                /// Get the value of the stroke-width.
30
                /// </summary>
31
                /// <param name="lineweightType"></param>
32
                /// <returns></returns>
33
                public double GetLineWeightValue(LineweightType lineweightType)
34
                {
17✔
35
                        double value = (double)lineweightType;
17✔
36
                        if (lineweightType == LineweightType.W0)
17!
NEW
37
                        {
×
NEW
38
                                value = 1;
×
NEW
39
                        }
×
40

41
                        return Math.Abs(value) / this.LineWeightRatio;
17✔
42
                }
17✔
43
        }
44
}
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