/// <summary> /// Closes the shape if needed. /// </summary> protected void closeShapeIfNeeded() { if (!IsClosedShape(_polyline)) { _polyline.AddLastPoint(_polyline.FirstPoint()); } }