internal KMLVec2(double x, double y, KMLUnits xunits, KMLUnits yunits) { X = x; Y = y; XUnits = xunits; YUnits = yunits; }
internal KMLVec2(XmlElement element) { if (element.HasAttribute("x")) { X = Double.Parse(element.GetAttribute("x"), CultureInfo.InvariantCulture); } else { X = 0.0; } if (element.HasAttribute("y")) { Y = Double.Parse(element.GetAttribute("y"), CultureInfo.InvariantCulture); } else { Y = 0.0; } if (element.HasAttribute("xunits")) { XUnits = (KMLUnits)Enum.Parse(typeof(KMLUnits), element.GetAttribute("xunits")); } else { XUnits = KMLUnits.fraction; } if (element.HasAttribute("yunits")) { YUnits = (KMLUnits)Enum.Parse(typeof(KMLUnits), element.GetAttribute("yunits")); } else { YUnits = KMLUnits.fraction; } }