MCPcopy Create free account
hub / github.com/9chu/LuaSTGPlus / StringToColor

Method StringToColor

TexturedFontEditor/Helper.cs:83–96  ·  view source on GitHub ↗
(string Data)

Source from the content-addressed store, hash-verified

81 }
82
83 public static Color StringToColor(string Data)
84 {
85 string[] tColorArr = Data.Split(',');
86
87 if (tColorArr.Length != 4)
88 throw new Exception("属性格式不正确: 请确保为'a,r,g,b'.");
89
90 return Color.FromArgb(
91 Convert.ToInt32(tColorArr[0]),
92 Convert.ToInt32(tColorArr[1]),
93 Convert.ToInt32(tColorArr[2]),
94 Convert.ToInt32(tColorArr[3])
95 );
96 }
97
98 public static PointF XmlElementToPointF(XmlElement Node, string NodeName, string Attribute="Value")
99 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected