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

            return(graphics?.TryDrawPolyline(points: pointsFunc.Invoke()) == true);
        }