public unsafe static extern GpStatus GdipFillEllipseI(
     GpGraphics graphics,
     GpBrush brush,
     int x,
     int y,
     int width,
     int height);
Exemplo n.º 2
0
 public unsafe Brush(ARGB color)
 {
     GdiPlus.Init();
     Unsafe.SkipInit(out GpBrush gpBrush);
     Imports.GdipCreateSolidFill(color, &gpBrush).ThrowIfFailed();
     _gpBrush = gpBrush;
 }
Exemplo n.º 3
0
        public Brush(GpBrush gpBrush)
        {
            if (gpBrush.Handle == IntPtr.Zero)
            {
                throw new ArgumentNullException(nameof(gpBrush));
            }

            _gpBrush = gpBrush;
        }
Exemplo n.º 4
0
        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);
            }
        }
Exemplo n.º 5
0
 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));
Exemplo n.º 6
0
 public static void FillEllipse(this Graphics graphics, GpBrush brush, Rectangle bounds)
 => FillEllipse(graphics, brush, bounds.X, bounds.Y, bounds.Width, bounds.Height);