protected override PdnGraphicsPath CreateShapePath(PointF[] points) { // make sure we don't screw them up if (points.Length < 2) { return null; } // make sure the shape has an area of at least 1 // we can determine this by making sure that all the Points in points are not all the same bool allTheSame = true; foreach (PointF pt in points) { if (pt != points[0]) { allTheSame = false; break; } } if (allTheSame) { return null; } PdnGraphicsPath path = new PdnGraphicsPath(); path.AddLines(points); path.AddLine(points[points.Length - 1], points[0]); path.CloseAllFigures(); return path; }
protected override PdnGraphicsPath CreateShapePath(PointF[] points) { // make sure we don't screw them up if (points.Length < 2) { return(null); } // make sure the shape has an area of at least 1 // we can determine this by making sure that all the Points in points are not all the same bool allTheSame = true; foreach (PointF pt in points) { if (pt != points[0]) { allTheSame = false; break; } } if (allTheSame) { return(null); } PdnGraphicsPath path = new PdnGraphicsPath(); path.AddLines(points); path.AddLine(points[points.Length - 1], points[0]); path.CloseAllFigures(); return(path); }