< Summary

Class:DCL.ECSComponents.PBTextShape_Defaults
Assembly:DCL.ECSComponents.Defaults
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/Defaults/PBTextShape_Defaults.cs
Covered lines:5
Uncovered lines:5
Coverable lines:10
Total lines:55
Line coverage:50% (5 of 10)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
GetVisible(...)0%6200%
GetOpacity(...)0%6200%
GetFontSize(...)0%220100%
GetHTextAlign(...)0%220100%
GetVTextAlign(...)0%220100%
GetWidth(...)0%220100%
GetHeight(...)0%220100%
GetShadowColor(...)0%6200%
GetOutlineColor(...)0%6200%
GetTextColor(...)0%6200%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/Defaults/PBTextShape_Defaults.cs

#LineLine coverage
 1namespace DCL.ECSComponents
 2{
 3    public static class PBTextShape_Defaults
 4    {
 5        public static bool GetVisible(this PBTextShape self)
 6        {
 07            return !self.HasVisible || self.Visible;
 8        }
 9
 10        public static float GetOpacity(this PBTextShape self)
 11        {
 012            return self.HasOpacity ? self.Opacity : 1.0f;
 13        }
 14
 15        public static float GetFontSize(this PBTextShape self)
 16        {
 5117            return self.HasFontSize ? self.FontSize : 10.0f;
 18        }
 19
 20        public static string GetHTextAlign(this PBTextShape self)
 21        {
 5122            return self.HasHTextAlign ? self.HTextAlign : "center";
 23        }
 24
 25        public static string GetVTextAlign(this PBTextShape self)
 26        {
 5127            return self.HasVTextAlign ? self.VTextAlign : "center";
 28        }
 29
 30        public static float GetWidth(this PBTextShape self)
 31        {
 432            return self.HasWidth ? self.Width : 1.0f;
 33        }
 34
 35        public static float GetHeight(this PBTextShape self)
 36        {
 437            return self.HasHeight ? self.Height : 1.0f;
 38        }
 39
 40        public static Color3 GetShadowColor(this PBTextShape self)
 41        {
 042            return self.ShadowColor ?? new Color3() { R = 1.0f, G = 1.0f, B = 1.0f };
 43        }
 44
 45        public static Color3 GetOutlineColor(this PBTextShape self)
 46        {
 047            return self.OutlineColor ?? new Color3() { R = 1.0f, G = 1.0f, B = 1.0f };
 48        }
 49
 50        public static Color3 GetTextColor(this PBTextShape self)
 51        {
 052            return self.TextColor ?? new Color3() { R = 1.0f, G = 1.0f, B = 1.0f };
 53        }
 54    }
 55}