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

Method StringToRectangleF

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

Source from the content-addressed store, hash-verified

66 }
67
68 public static RectangleF StringToRectangleF(string Data)
69 {
70 string[] tRectArr = Data.Split(',');
71
72 if (tRectArr.Length != 4)
73 throw new Exception("格式不正确: 请确保为'x1,y1,x2,y2'.");
74
75 return new RectangleF(
76 Convert.ToSingle(tRectArr[0]),
77 Convert.ToSingle(tRectArr[1]),
78 Convert.ToSingle(tRectArr[2]) - Convert.ToSingle(tRectArr[0]),
79 Convert.ToSingle(tRectArr[3]) - Convert.ToSingle(tRectArr[1])
80 );
81 }
82
83 public static Color StringToColor(string Data)
84 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected