diff --git a/binding/SkiaSharp/SKImageFilter.cs b/binding/SkiaSharp/SKImageFilter.cs index fe83e5143bb..2853d4cca19 100644 --- a/binding/SkiaSharp/SKImageFilter.cs +++ b/binding/SkiaSharp/SKImageFilter.cs @@ -406,6 +406,22 @@ public static SKImageFilter CreateMagnifier (SKRect lensBounds, float zoomAmount private static SKImageFilter CreateMagnifier (SKRect lensBounds, float zoomAmount, float inset, SKSamplingOptions sampling, SKImageFilter? input, SKRect* cropRect) => GetObject (SkiaApi.sk_imagefilter_new_magnifier (&lensBounds, zoomAmount, inset, &sampling, input?.Handle ?? IntPtr.Zero, cropRect)); + // CreatePaint + + [Obsolete("Use CreateShader(SKShader) instead.", true)] + public static SKImageFilter CreatePaint (SKPaint paint) + { + _ = paint ?? throw new ArgumentNullException (nameof (paint)); + return CreateShader(paint.Shader, paint.IsDither, null); + } + + [Obsolete("Use CreateShader(SKShader, bool, SKRect) instead.", true)] + public static SKImageFilter CreatePaint (SKPaint paint, SKRect cropRect) + { + _ = paint ?? throw new ArgumentNullException (nameof (paint)); + return CreateShader(paint.Shader, paint.IsDither, &cropRect); + } + // CreateShader public static SKImageFilter CreateShader (SKShader? shader) =>