public static SciterGraphics DrawPolygon(this SciterGraphics graphics, Func <IEnumerable <PolygonPoint> > pointsFunc)
        {
            if (pointsFunc == null)
            {
                throw new ArgumentNullException(nameof(pointsFunc), @"Cannot be null.");
            }

            return(graphics?.DrawPolygon(points: pointsFunc.Invoke()?.ToArray()));
        }
 public static SciterGraphics DrawPolygon(this SciterGraphics graphics, params PolygonPoint[] points)
 {
     return(graphics?.DrawPolygon(points: points?.AsEnumerable()));
 }