How do you draw an ellipse on a Canvas in .NET MAUI?

Platform: .NET MAUI|Category: General

Ellipses and circles can be drawn on an ICanvas using the DarwEllipse method, which requires x, y, width, and height arguments, of type float.
The following example shows how to draw an ellipse:

C#

canvas.StrokeColor = Colors.Red;
canvas.StrokeSize = 4;
canvas.DrawEllipse(10, 10, 100, 50);