Skip to content

Commit

Permalink
Add paint
Browse files Browse the repository at this point in the history
  • Loading branch information
mattleibow committed Mar 27, 2024
1 parent 66e5f55 commit c1de544
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions binding/SkiaSharp/SKImageFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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) =>
Expand Down

0 comments on commit c1de544

Please sign in to comment.