in binding/SkiaSharp/SKCanvas.cs [999:1023]
public void DrawPatch (SKPoint[] cubics, SKColor[] colors, SKPoint[] texCoords, SKPaint paint) =>
DrawPatch (cubics, colors, texCoords, SKBlendMode.Modulate, paint);
public void DrawPatch (SKPoint[] cubics, SKColor[] colors, SKPoint[] texCoords, SKBlendMode mode, SKPaint paint)
{
if (cubics == null)
throw new ArgumentNullException (nameof (cubics));
if (cubics.Length != PatchCubicsCount)
throw new ArgumentException ($"Cubics must have a length of {PatchCubicsCount}.", nameof (cubics));
if (colors != null && colors.Length != PatchCornerCount)
throw new ArgumentException ($"Colors must have a length of {PatchCornerCount}.", nameof (colors));
if (texCoords != null && texCoords.Length != PatchCornerCount)
throw new ArgumentException ($"Texture coordinates must have a length of {PatchCornerCount}.", nameof (texCoords));
if (paint == null)
throw new ArgumentNullException (nameof (paint));
fixed (SKPoint* cubes = cubics)
fixed (SKColor* cols = colors)
fixed (SKPoint* coords = texCoords) {
SkiaApi.sk_canvas_draw_patch (Handle, cubes, (uint*)cols, coords, mode, paint.Handle);
}
}