public PolygonElement AddPolygone(int width, Color color, IEnumerable<Vector> vertices) { var polygonElement = new PolygonElement(vertices, width, color); this.elements.Add(polygonElement); return polygonElement; }
private static XElement ToXml(PolygonElement polygonElement) { return new XElement("PolygonElement", new XAttribute("width", polygonElement.Width), new XAttribute("color", polygonElement.Color), new XElement("Vertices", string.Join(", ", polygonElement.Vertices))); }