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);