F# Beginner here, I want to draw a Polygon using ImageSharp. The build fails with:
No overloads match for method 'DrawPolygon'. The available overloads are shown below. error FS0001: This expression was expected to have type 'Image' but here has type 'a * 'b'.
let renderRect(img:Image<Rgba32>) =
let points: PointF list = [
new PointF(float32 2.0, float32 8.0);
new PointF(float32 4.0, float32 1.0);
new PointF(float32 1.0, float32 7.0);
new PointF(float32 5.0, float32 2.0);
]
img.Mutate (fun x -> x.DrawPolygon(Rgba32.White, 1.0, points))
img
The signature of the method i want to call:
static IImageProcessingContext<TPixel> DrawPolygon<TPixel>(this IImageProcessingContext<TPixel> source, TPixel color, float thickness, params PointF[] points) where TPixel : struct, IPixel<TPixel>