public unsafe static extern GpStatus GdipFillEllipseI( GpGraphics graphics, GpBrush brush, int x, int y, int width, int height);
public unsafe Brush(ARGB color) { GdiPlus.Init(); Unsafe.SkipInit(out GpBrush gpBrush); Imports.GdipCreateSolidFill(color, &gpBrush).ThrowIfFailed(); _gpBrush = gpBrush; }
public Brush(GpBrush gpBrush) { if (gpBrush.Handle == IntPtr.Zero) { throw new ArgumentNullException(nameof(gpBrush)); } _gpBrush = gpBrush; }
public static void FillEllipse(GpGraphics graphics, GpBrush brush, int x, int y, int width, int height) { GpStatus status = Imports.GdipFillEllipseI(graphics, brush, x, y, width, height); if (status != GpStatus.Ok) { throw GetExceptionForStatus(status); } }
public static void FillEllipse(this Graphics graphics, GpBrush brush, int x, int y, int width, int height) => ThrowIfFailed(Imports.GdipFillEllipseI(graphics, brush, x, y, width, height));
public static void FillEllipse(this Graphics graphics, GpBrush brush, Rectangle bounds) => FillEllipse(graphics, brush, bounds.X, bounds.Y, bounds.Width, bounds.Height);