public static Rect RectFromString(string s){
s = Regex.Replace (s, "\\{", "");
s = Regex.Replace (s, "\\}", "");
string[] ss = s.Split (',');
if (ss.Length < 4) {
return new Rect ();
} else {
float x = float.Parse(ss[0]);
float y = float.Parse(ss[1]);
float w = float.Parse(ss[2]);
float h = float.Parse(ss[3]);
return new Rect(x, y, w, h);
}
}