Skip to content

Commit

Permalink
Provide Span overload for SetRectRadii (#2949)
Browse files Browse the repository at this point in the history
  • Loading branch information
Youssef1313 authored Jul 19, 2024
1 parent 9fde53e commit 215abb5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions binding/SkiaSharp/SKRoundRect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ public void SetRectRadii (SKRect rect, SKPoint[] radii)
{
if (radii == null)
throw new ArgumentNullException (nameof (radii));

SetRectRadii(rect, radii.AsSpan());
}

public void SetRectRadii (SKRect rect, ReadOnlySpan<SKPoint> radii)
{
if (radii.Length != 4)
throw new ArgumentException ("Radii must have a length of 4.", nameof (radii));

Expand Down

0 comments on commit 215abb5

Please sign in to comment.