---
title: "GdiGraphics..::.FillEllipse Method (Brush, Rectangle)"
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Drawing_GdiGraphics_FillEllipse_2_d46d2e1e.htm
product: "Graphics Mill 5.5 for .NET"
---

This documentation is for the old version. [Go to the latest Graphics Mill docs](https://www.graphicsmill.com/docs/gm/)

# GdiGraphics.FillEllipse Method (Brush, Rectangle)
 
Fills an ellipse.
 
**Namespace:** [Aurigma.GraphicsMill.Drawing](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Drawing.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```
Public Sub FillEllipse ( _brush As Brush, _rect As Rectangle _
)
```
 
```csharp
public void FillEllipse(Brush brush,Rectangle rect
)
```
 
### Parameters
 
 - brush
     - Type: [Aurigma.GraphicsMill.Drawing.Brush](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Drawing_Brush.htm.md)
 [Brush](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Drawing_Brush.htm.md) object which is used to fill an ellipse.

 - rect
     - Type: [System.Drawing.Rectangle](http://msdn2.microsoft.com/en-us/1zk39146)
The bounding rectangle for the ellipse.
 
## Remarks
 Ellipse is defined by its tightest bounding rectangle. If you have an ellipse defined with central point and two radiuses, you can convert these parameters to rectangle in the following way: ```csharp
// Let's assume we have centerX, centerY - coordinates of the ellipse center, 
// horizontalRadius and verticalRadius - radiuses of the ellipse.
// We are calculating rectX, rectY, rectWidth, and rectHeight which specify 
// bounding rectangle for ellipse.

rectX = centerX - horizontalRadius;
rectY = centerY - verticalRadius;
rectWidth = horizontalRadius * 2;
rectHeight = verticalRadius * 2;
```
All the coordinates are measured in units specified with [Unit](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_UnitConverterObject_Unit.htm.md) property.

To outline an ellipse, use [DrawEllipse(Pen, Rectangle)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Drawing_GdiGraphics_DrawEllipse_2_9fdf5c51.htm.md) method.
   
## See Also

### Reference

- [GdiGraphics Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Drawing_GdiGraphics.htm.md)
- [FillEllipse Overload](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_Drawing_GdiGraphics_FillEllipse.htm.md)
- [Aurigma.GraphicsMill.Drawing Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Drawing.htm.md)
