< Summary

Class:Imagini.Fonts.FontDrawingOptions
Assembly:Imagini.Fonts
File(s):/home/razer/vscode-projects/project-grove/imagini/Imagini.Fonts/FontDrawingOptions.cs
Covered lines:4
Uncovered lines:5
Coverable lines:9
Total lines:33
Line coverage:44.4% (4 of 9)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity NPath complexity Sequence coverage Branch coverage
.cctor()1016.66%100%
.ctor(...)10100%100%

File(s)

/home/razer/vscode-projects/project-grove/imagini/Imagini.Fonts/FontDrawingOptions.cs

#LineLine coverage
 1namespace Imagini.Fonts
 2{
 3    /// <summary>
 4    /// Font drawing options which control the text rendering process.
 5    /// </summary>
 6    public struct FontDrawingOptions
 7    {
 8        /// <summary>
 9        /// Font scale.
 10        /// </summary>
 3111        public float Scale { get; set; }
 12        /// <summary>
 13        /// Letter spacing (in pixels). Will be multiplied by the specified scale.
 14        /// </summary>
 1915        public int LetterSpacing { get; set; }
 16
 17        /// <summary>
 18        /// Default font drawing options.
 19        /// </summary>
 020        public static FontDrawingOptions Default =
 021            new FontDrawingOptions()
 122            {
 023                Scale = 1.0f,
 024                LetterSpacing = 0
 025            };
 26
 27        /// <summary>
 28        /// Creates a FontDrawingOptions object with specified parameters.
 29        /// </summary>
 30        public FontDrawingOptions(float scale = 1.0f, int spacing = 0) =>
 631            (Scale, LetterSpacing) = (scale, spacing);
 32    }
 33}