Graphics.FillRectangle
FillRectangle(Brush, Rectangle)
填充由 Rectangle 结构指定的矩形内部。
public void FillRectangle(Brush brush, Rectangle rect)
异常
| 异常 | 条件 |
|---|
| ArgumentNullException | brush 为 null。 |
另请参见
FillRectangle(Brush, RectangleF)
填充由 RectangleF 结构指定的矩形内部。
public void FillRectangle(Brush brush, RectangleF rect)
异常
| 异常 | 条件 |
|---|
| ArgumentNullException | brush 为 null。 |
另请参见
FillRectangle(Brush, float, float, float, float)
填充由一对坐标、宽度和高度指定的矩形的内部。
public void FillRectangle(Brush brush, float x, float y, float width, float height)
| 参数 | 类型 | 描述 |
|---|
| brush | Brush | Brush,决定填充的特性。 |
| x | 单精度 | 要填充的矩形左上角的 x 坐标。 |
| y | 单精度 | 要填充的矩形左上角的 y 坐标。 |
| 宽度 | 单精度 | 要填充的矩形的宽度。 |
| 高度 | 单精度 | 要填充的矩形的高度。 |
异常
| 异常 | 条件 |
|---|
| ArgumentNullException | brush 为 null。 |
另请参见
FillRectangle(Brush, int, int, int, int)
填充由一对坐标、宽度和高度指定的矩形的内部。
public void FillRectangle(Brush brush, int x, int y, int width, int height)
| 参数 | 类型 | 描述 |
|---|
| brush | Brush | Brush,决定填充的特性。 |
| x | Int32 | 要填充的矩形左上角的 x 坐标。 |
| y | Int32 | 要填充的矩形左上角的 y 坐标。 |
| 宽度 | Int32 | 要填充的矩形的宽度。 |
| 高度 | Int32 | 要填充的矩形的高度。 |
异常
| 异常 | 条件 |
|---|
| ArgumentNullException | brush 为 null。 |
另请参见