---
title: "GdiGraphics..::.FillRectangle Method (Brush, Single, Single, Single, Single)"
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Drawing_GdiGraphics_FillRectangle_5_2d30ad96.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.FillRectangle Method (Brush, Single, Single, Single, Single)
 
Fills a rectangle.
 
**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 FillRectangle ( _brush As Brush, _x As Single, _y As Single, _width As Single, _height As Single _
)
```
 
```csharp
public void FillRectangle(Brush brush,float x,float y,float width,float height
)
```
 
### 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 a rectangle.

 - x
     - Type: [System.Single](http://msdn2.microsoft.com/en-us/3www918f)
X-coordinate of the top left corner of the rectangle.

 - y
     - Type: [System.Single](http://msdn2.microsoft.com/en-us/3www918f)
Y-coordinate of the top left corner of the rectangle.

 - width
     - Type: [System.Single](http://msdn2.microsoft.com/en-us/3www918f)
Width of the rectangle.

 - height
     - Type: [System.Single](http://msdn2.microsoft.com/en-us/3www918f)
Height of the rectangle.
 
## Remarks
 To outline a rectangle, use [DrawRectangle(Pen, Single, Single, Single, Single)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Drawing_GdiGraphics_DrawRectangle_5_b3708ac1.htm.md) method. 
All the coordinates are measured in units specified with [Unit](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_UnitConverterObject_Unit.htm.md) property.
   
## See Also

### Reference

- [GdiGraphics Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Drawing_GdiGraphics.htm.md)
- [FillRectangle Overload](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_Drawing_GdiGraphics_FillRectangle.htm.md)
- [Aurigma.GraphicsMill.Drawing Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Drawing.htm.md)
