public Point ExtractCoords(string input)
{
int x = Convert.ToInt32(Regex.Match(input, @"<!--\s*[xX]\s*=\s*([0-9]+)\s*-->").Groups[1].Value);
int y = Convert.ToInt32(Regex.Match(input, @"<!--\s*[yY]\s*=\s*([0-9]+)\s*-->").Groups[1].Value);
return new Point(x, y);
}