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

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