From fea53a8b40bbc304cd4f4bdc80fa7c70510743d9 Mon Sep 17 00:00:00 2001 From: DJGosnell Date: Mon, 2 Sep 2024 22:05:01 -0400 Subject: [PATCH] Added SKCanvas.DrawPoints with a count override to allow for partial point array drawing. --- binding/SkiaSharp/SKCanvas.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/binding/SkiaSharp/SKCanvas.cs b/binding/SkiaSharp/SKCanvas.cs index d1d7300964..d0b5ec7f0a 100644 --- a/binding/SkiaSharp/SKCanvas.cs +++ b/binding/SkiaSharp/SKCanvas.cs @@ -420,6 +420,17 @@ public void DrawPoints (SKPointMode mode, SKPoint[] points, SKPaint paint) } } + public void DrawPoints (SKPointMode mode, SKPoint[] points, int count, SKPaint paint) + { + if (paint == null) + throw new ArgumentNullException (nameof (paint)); + if (points == null) + throw new ArgumentNullException (nameof (points)); + fixed (SKPoint* p = points) { + SkiaApi.sk_canvas_draw_points (Handle, mode, (IntPtr)count, p, paint.Handle); + } + } + // DrawPoint public void DrawPoint (SKPoint p, SKPaint paint)